|
@@ -16,6 +16,7 @@ import com.usky.iot.domain.SysWxOpuser;
|
|
|
import com.usky.iot.service.SysWxOpuserService;
|
|
|
import com.usky.iot.service.vo.SendWeChatMessageRequestVO;
|
|
|
import com.usky.iot.service.vo.SignUpRequestVO;
|
|
|
+import com.usky.iot.service.vo.TemplateData;
|
|
|
import com.usky.iot.service.vo.TemplateMsgEntityVO;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import ma.glasnost.orika.impl.util.StringUtil;
|
|
@@ -356,13 +357,13 @@ public class WeChatController {
|
|
|
|
|
|
String requestUrl = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + token;
|
|
|
Map<String,Object> content=new HashMap<>();
|
|
|
- JSONObject data = new JSONObject();
|
|
|
- data.put("first",new JSONObject().put("value",messageVo.getTTitle()));
|
|
|
- data.put("keyword1",new JSONObject().put("value",messageVo.getTKeyword1()));
|
|
|
- data.put("keyword2",new JSONObject().put("value",messageVo.getTKeyword2()));
|
|
|
- data.put("keyword3",new JSONObject().put("value",messageVo.getTKeyword3()));
|
|
|
- data.put("keyword4",new JSONObject().put("value",messageVo.getTKeyword4()));
|
|
|
- data.put("remark",new JSONObject().put("value",messageVo.getTRemark()));
|
|
|
+ Map<String, TemplateData> data = new HashMap<>();
|
|
|
+ data.put("first",new TemplateData(messageVo.getTTitle()));
|
|
|
+ data.put("keyword1",new TemplateData(messageVo.getTKeyword1()));
|
|
|
+ data.put("keyword2",new TemplateData(messageVo.getTKeyword2()));
|
|
|
+ data.put("keyword3",new TemplateData(messageVo.getTKeyword3()));
|
|
|
+ data.put("keyword4",new TemplateData(messageVo.getTKeyword4()));
|
|
|
+ data.put("remark",new TemplateData(messageVo.getTRemark()));
|
|
|
|
|
|
content.put("touser",openId);
|
|
|
content.put("url",messageVo.getTUrl());
|