weChatTemplate: WeChatTemplate(touser=o0phUw-3rgTqWw7hth5ahyTWFj3A, template_id=RUvEZ6TN0QQjaoIkwi_ICnP58_n1Vr7XRQWBZQYMKhA, url=null, miniprogram=null, data={phrase9={value=订单审核}, character_string2={value=59240526999001703}, thing8={value=测试景区}, time5={value=2024-05-29}}) 2024-05-29 14:47:45.986 [http-nio-8082-exec-3] INFO c.e.cloud.service.generator.impl.SmsServiceImpl:313 - url:https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=80_MvwE5V1xEtxA7vvTcptxI6wQ846LJ4N8pnbxvOX0yIrSNPKEYgrq4OdhkVDL45q_yDnFqqGQRl3bE1EcXUqewNohdAQqAO8-OJbGgHvXT3MG_RHZ36cEVQisONMJTLiAGAFPH WeiXinResponse result = restTemplate.postForObject(String.format(PUSH_MESSAGE_URL, access_token), JSON.toJSON(weChatTemplate), WeiXinResponse.class); log.info(result.toString()); if (result.getErrmsg().equals("ok")) { log.info("PMS景区【" + poi.getName() + "】订单【" + orderInfo.getOrderCode() + "】已通知"); } if (result.getErrmsg() == null && !result.getErrmsg().equals("ok")) { log.info("出异常了,发送微信通知是吧"); //return Result.failure(ResultCode.SEND_MESSAGE_FAIL); } [图片]
模板消息发送发送报errcode=47001, errmsg=data format error{ "data": { "phrase9": { "value": "订单审核" }, "character_string2": { "value": "59240526999001703" }, "thing8": { "value": "测试景区" }, "time5": { "value": "2024-05-29" } }, "templateId": "RUvEZ6TN0QQjaoIkwi_ICnP58_n1Vr7XRQWBZQYMKhA", "toUser": "o0phUw-3rgTqWw7hth5ahyTWFj3A", "url": "" } https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=80_sm6KWd-Xo4R-RW1t1OnAvA4WTu4vGZzXgCR0Q6aMzcPZN_71fcqWo-GTOa8PG_NszYXO-MmCfTmtsGdGrNiCjzSLoigbuBYU4VE-7RH25P19qoJ97pvJqpax3UYXKRdAFAFSZ WeiXinResponse result = restTemplate.postForObject(String.format(PUSH_MESSAGE_URL, access_token), weChatTemplate.getData(), WeiXinResponse.class); WeiXinResponse(errcode=47001, errmsg=data format error rid: 66569ae3-6fe89688-274b3e3b, msgid=null)
2024-05-29