package com.jxy.system.api;

import com.jxy.common.core.Result.R;
import com.jxy.common.core.constant.ServiceNameConstants;
import com.jxy.system.api.entity.EmailEntity;
import com.jxy.system.api.entity.GetEmailCodeEntity;
import com.jxy.system.api.entity.SysUser;
import com.jxy.system.api.factory.RemoteMailFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 邮件服务
 *
 * @author jxy
 */
@FeignClient(contextId = "remoteMailService", value = ServiceNameConstants.AUTH_SERVICE, fallbackFactory = RemoteMailFallbackFactory.class)
public interface RemoteMailService
{
    /**
     * 发送提现的邮箱验证码
     *
     * @return 结果
     */
    @PostMapping("/addCreditEmailCode")
    public R<?> sendAddCreditEmailCode(@RequestBody GetEmailCodeEntity entity);

    /**
     * 发送文本邮件
     *
     * @return 结果
     */
    @PostMapping("/sendTextMail")
    public R<?> sendTextMail(@RequestBody EmailEntity entity);
}

