From 8dc4911ee4611a18ed9e965d3556456305627401 Mon Sep 17 00:00:00 2001 From: 童刚 <pBP8jclM@8yTJ@4h> Date: 星期二, 09 八月 2022 09:38:38 +0800 Subject: [PATCH] 1 --- phi-sms-feign/src/main/java/com/hz/sms/feign/FWXSendService.java | 15 ++++++++++++--- phi-sms-feign/src/main/java/com/hz/sms/dto/ResponsesWxSendMpDto.java | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/phi-sms-feign/src/main/java/com/hz/sms/dto/ResponsesWxSendMpDto.java b/phi-sms-feign/src/main/java/com/hz/sms/dto/ResponsesWxSendMpDto.java new file mode 100644 index 0000000..1355280 --- /dev/null +++ b/phi-sms-feign/src/main/java/com/hz/sms/dto/ResponsesWxSendMpDto.java @@ -0,0 +1,34 @@ +package com.hz.sms.dto; + +import com.alibaba.fastjson.JSONObject; +import com.hx.util.StringUtils; +import lombok.Data; + +@Data +public class ResponsesWxSendMpDto { + /** 鏍囪瘑 (璁板綍wx_mp琛ㄦ暟鎹殑id) 涓嶇敤浼�*/ + private String id; + + /** 灏忕▼搴廰ppId*/ + private String mpId; + + /** 鎵�闇�涓嬪彂鐨勮闃呮ā鏉縤d*/ + private String templateId; + /** 鎺ュ彛璋冪敤鍑瘉锛岃鍙傛暟涓� URL 鍙傛暟锛岄潪 Body 鍙傛暟*/ + private String Page; + /** 鎺ユ敹鑰咃紙鐢ㄦ埛锛夌殑 openid*/ + private String touSer; + /** 璺宠浆灏忕▼搴忕被鍨嬶細developer涓哄紑鍙戠増锛泃rial涓轰綋楠岀増锛沠ormal涓烘寮忕増锛涢粯璁や负姝e紡鐗�*/ + private String minIpGramState; + /** 杩涘叆灏忕▼搴忔煡鐪嬧�濈殑璇█绫诲瀷锛屾敮鎸亃h_CN(绠�浣撲腑鏂�)銆乪n_US(鑻辨枃)銆亃h_HK(绻佷綋涓枃)銆亃h_TW(绻佷綋涓枃)锛岄粯璁や负zh_CN*/ + private String lang; + /** 妯℃澘鍐呭*/ + private JSONObject data; + + public String getLang() { + if (StringUtils.isEmpty(lang)){ + return "zh_CN"; + } + return lang; + } +} diff --git a/phi-sms-feign/src/main/java/com/hz/sms/feign/FWXSendService.java b/phi-sms-feign/src/main/java/com/hz/sms/feign/FWXSendService.java index eb1f87a..189b358 100644 --- a/phi-sms-feign/src/main/java/com/hz/sms/feign/FWXSendService.java +++ b/phi-sms-feign/src/main/java/com/hz/sms/feign/FWXSendService.java @@ -2,11 +2,13 @@ import com.hx.resultTool.Result; import com.hz.sms.dto.ResponsesSendMessage; -import com.hz.sms.dto.SmsGeneralSendDto; +import com.hz.sms.dto.ResponsesWxSendMpDto; import com.hz.sms.dto.TemplateMessageDto; 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 闇�瑕佸~鍐� 璇锋眰鐨勬湇鍔℃彁渚涜�呯殑娉ㄥ唽鍒皀acos Server涓婇潰鐨勬湇鍔″悕锛宲ath 鏄姹傛帴鍙e墠缂� @@ -35,7 +37,14 @@ * @param responsesSendMessage * @return */ - @PostMapping(value = "/public/message") - Result sendPublicMessage(@RequestBody ResponsesSendMessage responsesSendMessage); + @PostMapping(value = "/wechat/message") + Result sendWeChatMessage(@RequestBody ResponsesSendMessage responsesSendMessage); + /** + * 寰俊灏忕▼搴忓彂閫佽闃呮秷鎭� + * @param responsesWxSendMpDto + * @return + */ + @RequestMapping(value = "/mp/subscribe/message") + Result sendMpMessage(@RequestBody ResponsesWxSendMpDto responsesWxSendMpDto); } -- Gitblit v1.8.0