Commit 58828575 by 吕明尚

更改订阅消息模板ID

parent ddb22da2
......@@ -3,7 +3,7 @@ package share.common.enums;
public enum MessageReminderEnum {
//预约到期通知:oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8,订单开始通知:K8fbcKVq46w9o7Ekpesn74WPjwxnbso947YZiYBQw9c,订单结单通知:HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg
RESERVER("预约到期通知", "oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8"),
START("订单开始通知", "K8fbcKVq46w9o7Ekpesn74WPjwxnbso947YZiYBQw9c"),
START("订单开始通知", "K8fbcKVq46w9o7Ekpesn74RThj_Yw6hFNwA-A5L3XA0"),
END("订单结单通知", "HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg");
private String name;
private String value;
......
......@@ -23,7 +23,7 @@ public class TemplateMessageVo {
private String template_id;
@ApiModelProperty(value = "模板跳转链接(海外帐号没有跳转能力)")
private String url;
private String page;
@ApiModelProperty(value = "发送内容")
private HashMap<String, SendTemplateMessageItemVo> data;
......
......@@ -530,7 +530,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//发送模板消息 预约提醒到期
TemplateMessageVo templateMessageVo = new TemplateMessageVo();
String url = "https://www.coujio.com/front-api/order/" + byOrderNo.getOrderNo();
templateMessageVo.setUrl(url);
templateMessageVo.setPage(url);
HashMap<String, SendTemplateMessageItemVo> data = new HashMap<>();
SStore sStore = storeService.getById(byOrderNo.getStoreId());
SRoomVo sRoomVo = roomService.selectSRoomById(byOrderNo.getRoomId());
......@@ -541,6 +541,7 @@ public class WechatNewServiceImpl implements WechatNewService {
String preStartDateStr = DateUtil.format(preStartDate, DatePattern.NORM_DATETIME_MINUTE_FORMATTER);
String preEndDateStr = DateUtil.format(preEndDate, DatePattern.NORM_DATETIME_MINUTE_FORMATTER);
SConsumerToken tokenByUserId = sConsumerTokenService.getTokenByUserId(byOrderNo.getConsumerId());
String date = preStartDateStr + "~" + preEndDateStr;
templateMessageVo.setTouser(tokenByUserId.getToken());
if (messageReminderEnum.equals(MessageReminderEnum.RESERVER)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.RESERVER.getValue());
......@@ -549,9 +550,11 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data.put("thing7", new SendTemplateMessageItemVo(sRoomVo.getName()));
//预约时间
data.put("date3", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
data.put("date3", new SendTemplateMessageItemVo(date));
//地址
data.put("thing5", new SendTemplateMessageItemVo(sStore.getAddress()));
String address = sStore.getAddress();
String substring = address.substring(0, 20);
data.put("thing5", new SendTemplateMessageItemVo(substring));
} else if (messageReminderEnum.equals(MessageReminderEnum.START)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.START.getValue());
//预约门店
......@@ -559,7 +562,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data.put("thing7", new SendTemplateMessageItemVo(sRoomVo.getName()));
//预约时间
data.put("time8", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
data.put("time8", new SendTemplateMessageItemVo(date));
//地址
//截取20个字符
String address = sStore.getAddress();
......@@ -574,7 +577,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data.put("thing6", new SendTemplateMessageItemVo(sRoomVo.getName()));
//订单时间
data.put("time7", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
data.put("time7", new SendTemplateMessageItemVo(date));
//地址
//截取20个字符
String address = sStore.getAddress();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment