package cn.axzo.msg.center.notices.http.api.api;


import cn.axzo.msg.center.notices.http.api.request.SendBatchMessageRequest;
import cn.axzo.msg.center.notices.http.api.request.SendMobileMessageRequest;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 短信通知接口
 *
 * @author zhaoyong_sh
 * @see MessageNotifyApi
 * @since 2021-05-20 11:27
 */
@FeignClient(
        name = "msg-center",
        url = "${server.serviceUrl}"
)
public interface MessageNotifyApi {

    /**
     * 发送手机短信
     * @param request
     * @return
     */
    @RequestMapping(value = "/api/v1/message/send", method = RequestMethod.POST)
    CommonResponse sendMobileMessage(SendMobileMessageRequest request);

    /**
     * 批量发送短信
     * @param request
     * @return
     */
    @RequestMapping(value = "/api/v1/message/batch", method = RequestMethod.POST)
    CommonResponse sendBatchMessage(SendBatchMessageRequest request);

}
