From eb80b83a3d4a0b59325e90405dc6c687c2904d3a Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期三, 05 一月 2022 14:45:16 +0800 Subject: [PATCH] 商家后台相关代码提交 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java index ed34ba8..863bee0 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java @@ -362,6 +362,32 @@ } } + /** + * 预约提醒订阅消息通知 + * @param openId 用户openid + * @param accessToken token会话标识 + * @param result 预约结果 + * @param title 预约主题 + * @param name 预约人 + * @param time 预约时间 + */ + public static void sendSubscribeYYTX(String openId, String accessToken, String result, String title, String name,String time){ + WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); + subscribeDTO.setTouser(openId); + subscribeDTO.setTemplate_id(WxSubscribeConstants.YYTX_ID); + List<TemplateParam> paras=new ArrayList<TemplateParam>(); + paras.add(new TemplateParam("phrase8",result));//预约结果 + paras.add(new TemplateParam("thing23",title));//预约主题 + paras.add(new TemplateParam("name5",name));//预约人 + paras.add(new TemplateParam("date7",time));//预约时间 + subscribeDTO.setTemplateParamList(paras); + try { + sendSubscribe(accessToken,subscribeDTO); + }catch (Exception e){ + log.error("预约提醒订阅消息推送失败,失败原因:" + e.getMessage()); + } + } + public static void main(String[] args) { WxXCXTempSend util = new WxXCXTempSend(); -- Gitblit v1.7.1