package com.ssyf.feign.application.message;

import com.ssyf.common.domain.message.query.MailQuery;
import com.ssyf.common.web.result.Result;
import com.ssyf.feign.config.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


/**
 * 邮件微服务
 * @author huwei
 * @date 2023/9/27 11:25
 */
@FeignClient( name = "message" ,path = "/message",contextId = "mail",configuration = FeignConfiguration.class)
public interface MailFeignService {

    /**
     * 发送消息
     * @param query
     * @return
     */
    @RequestMapping(value = "/api/mail/sendAsync" ,method = RequestMethod.POST ,consumes = MediaType.APPLICATION_JSON_VALUE)
    Result send(@RequestBody MailQuery query);
}
