Commit ea4b6776 by wuwenlong

Merge remote-tracking branch 'origin/main'

parents a706f7f3 2cc7b36c
...@@ -877,7 +877,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -877,7 +877,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw new BaseException("预约时间未到达,可提前"+Constants.OPEN_DOOR_AHEAD_HOUR+"进场,请耐心等候!"); throw new BaseException("预约时间未到达,可提前"+Constants.OPEN_DOOR_AHEAD_HOUR+"进场,请耐心等候!");
} }
//更改订单状态,房间状态,开始时间,结束时间 //更改订单状态,房间状态,开始时间,结束时间
sOrder.setStatus(1); sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
//计算预约开始和结束时间时长 //计算预约开始和结束时间时长
BigDecimal bigDecimal = DateUtils.differentHour(sOrder.getPreStartDate(), sOrder.getPreEndDate()); BigDecimal bigDecimal = DateUtils.differentHour(sOrder.getPreStartDate(), sOrder.getPreEndDate());
sOrder.setStartDate(new Date()); sOrder.setStartDate(new Date());
......
...@@ -67,6 +67,9 @@ public class WechatNewServiceImpl implements WechatNewService { ...@@ -67,6 +67,9 @@ public class WechatNewServiceImpl implements WechatNewService {
@Autowired @Autowired
private ISStoreService storeService; private ISStoreService storeService;
@Autowired
private ISRoomService roomService;
/** /**
* 获取公众号accessToken * 获取公众号accessToken
*/ */
...@@ -526,8 +529,11 @@ public class WechatNewServiceImpl implements WechatNewService { ...@@ -526,8 +529,11 @@ public class WechatNewServiceImpl implements WechatNewService {
public Boolean sendMiniSubscribeMessage(SOrder byOrderNo, MessageReminderEnum messageReminderEnum) { public Boolean sendMiniSubscribeMessage(SOrder byOrderNo, MessageReminderEnum messageReminderEnum) {
//发送模板消息 预约提醒到期 //发送模板消息 预约提醒到期
TemplateMessageVo templateMessageVo = new TemplateMessageVo(); TemplateMessageVo templateMessageVo = new TemplateMessageVo();
String url = "https://www.coujio.com/front-api/order/" + byOrderNo.getOrderNo();
templateMessageVo.setUrl(url);
HashMap<String, SendTemplateMessageItemVo> data = new HashMap<>(); HashMap<String, SendTemplateMessageItemVo> data = new HashMap<>();
SStore sStore = storeService.getById(byOrderNo.getStoreId()); SStore sStore = storeService.getById(byOrderNo.getStoreId());
SRoomVo sRoomVo = roomService.selectSRoomById(byOrderNo.getRoomId());
//拼接开始和结束时间 //拼接开始和结束时间
Date preStartDate = byOrderNo.getPreStartDate(); Date preStartDate = byOrderNo.getPreStartDate();
Date preEndDate = byOrderNo.getPreEndDate(); Date preEndDate = byOrderNo.getPreEndDate();
...@@ -539,9 +545,9 @@ public class WechatNewServiceImpl implements WechatNewService { ...@@ -539,9 +545,9 @@ public class WechatNewServiceImpl implements WechatNewService {
if (messageReminderEnum.equals(MessageReminderEnum.RESERVER)) { if (messageReminderEnum.equals(MessageReminderEnum.RESERVER)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.RESERVER.getValue()); templateMessageVo.setTemplate_id(MessageReminderEnum.RESERVER.getValue());
//添加门店名称 //添加门店名称
data.put("thing4", new SendTemplateMessageItemVo()); data.put("thing4", new SendTemplateMessageItemVo("武汉" + sStore.getName()));
//服务名称 //服务名称
data.put("thing7", new SendTemplateMessageItemVo()); data.put("thing7", new SendTemplateMessageItemVo(sRoomVo.getName()));
//预约时间 //预约时间
data.put("date3", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr)); data.put("date3", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
//地址 //地址
...@@ -549,9 +555,9 @@ public class WechatNewServiceImpl implements WechatNewService { ...@@ -549,9 +555,9 @@ public class WechatNewServiceImpl implements WechatNewService {
} else if (messageReminderEnum.equals(MessageReminderEnum.START)) { } else if (messageReminderEnum.equals(MessageReminderEnum.START)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.START.getValue()); templateMessageVo.setTemplate_id(MessageReminderEnum.START.getValue());
//预约门店 //预约门店
data.put("thing6", new SendTemplateMessageItemVo()); data.put("thing6", new SendTemplateMessageItemVo("武汉" + sStore.getName()));
//服务名称 //服务名称
data.put("thing7", new SendTemplateMessageItemVo()); data.put("thing7", new SendTemplateMessageItemVo(sRoomVo.getName()));
//预约时间 //预约时间
data.put("time8", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr)); data.put("time8", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
//地址 //地址
...@@ -561,9 +567,9 @@ public class WechatNewServiceImpl implements WechatNewService { ...@@ -561,9 +567,9 @@ public class WechatNewServiceImpl implements WechatNewService {
} else if (messageReminderEnum.equals(MessageReminderEnum.END)) { } else if (messageReminderEnum.equals(MessageReminderEnum.END)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.END.getValue()); templateMessageVo.setTemplate_id(MessageReminderEnum.END.getValue());
//订单门店 //订单门店
data.put("thing5", new SendTemplateMessageItemVo()); data.put("thing5", new SendTemplateMessageItemVo("武汉" + sStore.getName()));
//服务名称 //服务名称
data.put("thing6", new SendTemplateMessageItemVo()); data.put("thing6", new SendTemplateMessageItemVo(sRoomVo.getName()));
//订单时间 //订单时间
data.put("time7", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr)); data.put("time7", new SendTemplateMessageItemVo(preStartDateStr + "-" + preEndDateStr));
//地址 //地址
......
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