| | |
| | | package com.hz.sms.feign; |
| | | |
| | | import com.hx.resultTool.Result; |
| | | import com.hz.sms.dto.ResponsesSendMessage; |
| | | import com.hz.sms.dto.ResponsesWxSendMpDto; |
| | | import com.hz.sms.dto.TemplateMessageDto; |
| | | |
| | | import com.hz.sms.dto.WeCatMessageDto; |
| | | import com.hz.sms.dto.MpMessageDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | /** |
| | | * 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 |
| | | */ |
| | | @FeignClient(name="phi-sms-user",path = "/sms",contextId = "sys-send") |
| | | @FeignClient(name="phi-sms-user",path = "/sms",contextId = "send-wx") |
| | | public interface FWXSendService { |
| | | |
| | | /** |
| | | * 发送企业微信应用消息 |
| | | * @param templateMessageDto |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/application/message") |
| | | Result sendNoticeSms(@RequestBody TemplateMessageDto templateMessageDto); |
| | | |
| | | /** |
| | | * 微信小程序下发统一消息 (废除) |
| | | * @param responsesSendMessage |
| | | * @return |
| | | * @param weCatMessageDto |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @PostMapping(value = "/applet/message") |
| | | Result sendAppletMessage(@RequestBody ResponsesSendMessage responsesSendMessage); |
| | | @PostMapping(value = "/wx/send/applet/message") |
| | | Result sendAppletMessage(@RequestBody WeCatMessageDto weCatMessageDto); |
| | | |
| | | /** |
| | | * 微信公众号下发统一消息 |
| | | * @param responsesSendMessage |
| | | * @return |
| | | * @param weCatMessageDto |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @PostMapping(value = "/wechat/message") |
| | | Result sendWeChatMessage(@RequestBody ResponsesSendMessage responsesSendMessage); |
| | | @PostMapping(value = "/wx/send/wechat/message") |
| | | Result sendWeChatMessage(@RequestBody WeCatMessageDto weCatMessageDto); |
| | | |
| | | /** |
| | | * 微信小程序发送订阅消息 |
| | | * @param responsesWxSendMpDto |
| | | * @return |
| | | * @param mpMessageDto |
| | | * @return SendResultDto转化接收 |
| | | */ |
| | | @RequestMapping(value = "/mp/subscribe/message") |
| | | Result sendMpMessage(@RequestBody ResponsesWxSendMpDto responsesWxSendMpDto); |
| | | @RequestMapping(value = "/wx/send/mp/subscribe/message") |
| | | Result sendMpMessage(@RequestBody MpMessageDto mpMessageDto); |
| | | } |