Browse Source

fix:消息通知6

wrj 10 months ago
parent
commit
60ff1944ab

+ 5 - 5
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/TJsServiceImpl.java

@@ -142,12 +142,12 @@ public class TJsServiceImpl extends ServiceImpl<TJsMapper, TJs> implements TJsSe
 
         cn.hutool.json.JSONObject param = JSONUtil.createObj();
         //订单号
-        param.set("thing01", JSONUtil.createObj().set("value", "23010000010101"));
+        param.set("character_string9", JSONUtil.createObj().set("value", "23010000010101"));
         //点话
-        param.set("thing02",JSONUtil.createObj().set("value", "18360233903"));
-        param.set("thing03",JSONUtil.createObj().set("value", "李四"));
-        param.set("thing04",JSONUtil.createObj().set("value", "2022年11月11日22:22"));
-        param.set("thing05",JSONUtil.createObj().set("value", "湖南长沙岳麓"));
+        param.set("phone_number14",JSONUtil.createObj().set("value", "18360233903"));
+        param.set("thing18",JSONUtil.createObj().set("value", "李四"));
+        param.set("time6",JSONUtil.createObj().set("value", "2022年11月11日22:22"));
+        param.set("thing27",JSONUtil.createObj().set("value", "湖南长沙岳麓"));
         weChatUtil.notification(openId, param);
 
     }

+ 3 - 3
nightFragrance-massage/src/main/java/com/ylx/massage/utils/WeChatUtil.java

@@ -253,15 +253,15 @@ public class WeChatUtil {
 
         String url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + token;
 
-        String param = "{\"touser\":\"o-HEJ6RAjBDjFvuZcAdHRX8mIZXw\",\"template_id\":\"HU2LfMIes91Au9kxR3VEoNYuMayxZoPNsFRfWNCmKrQ\",\"url\":\"https://test.baoxianzhanggui.com/fragrance/\",\"data\":{\"thing01\":{\"value\":\"23010000010101\"},\"thing02\":{\"value\":\"18360233903\"},\"thing03\":{\"value\":\"李四\"},\"thing04\":{\"value\":\"2022年11月11日22:22\"},\"thing05\":{\"value\":\"湖南长沙岳麓\"}}}";
+        //String param = "{\"touser\":\"o-HEJ6RAjBDjFvuZcAdHRX8mIZXw\",\"template_id\":\"HU2LfMIes91Au9kxR3VEoNYuMayxZoPNsFRfWNCmKrQ\",\"url\":\"https://test.baoxianzhanggui.com/fragrance/\",\"data\":{\"thing01\":{\"value\":\"23010000010101\"},\"thing02\":{\"value\":\"18360233903\"},\"thing03\":{\"value\":\"李四\"},\"thing04\":{\"value\":\"2022年11月11日22:22\"},\"thing05\":{\"value\":\"湖南长沙岳麓\"}}}";
         cn.hutool.json.JSONObject param1 = JSONUtil.createObj();
         param1.put("touser", openid);
         param1.put("template_id", wxPayProperties.getTemplateId1());
         param1.put("url", "https://test.baoxianzhanggui.com/fragrance/");
         param1.put("data", data);
-        String result = HttpUtil.post(url, param);
+        String result = HttpUtil.post(url, param1);
         System.out.println(result);
-        log.info("notification-消息通知请求参数:{}", param);
+        log.info("notification-消息通知请求参数:{}", param1);
         Map<?, ?> map = JSONObject.parseObject(result, Map.class);
         log.info("notification-消息通知返回参数:{}", map);
         return map;