Commit 7b76485f by 吕明尚

添加微信小程序订阅消息

parent 28939141
...@@ -357,6 +357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -357,6 +357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerCoupon.setUseStatus(UserStatusEnum.USED.getCode()); consumerCoupon.setUseStatus(UserStatusEnum.USED.getCode());
consumerCouponService.updateById(consumerCoupon); consumerCouponService.updateById(consumerCoupon);
} }
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
sConsumptionRecordsService.insertSConsumptionRecords(sOrder); sConsumptionRecordsService.insertSConsumptionRecords(sOrder);
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo()); map.put("orderNo", sOrder.getOrderNo());
...@@ -372,6 +373,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -372,6 +373,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sOrder.setStatus(OrderStatusEnum.INUSE.getCode()); sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
//支付金额为0的 //支付金额为0的
if (request.getPayFee().compareTo(BigDecimal.ZERO) <= 0) { if (request.getPayFee().compareTo(BigDecimal.ZERO) <= 0) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
if (response.getStatus().equals(YesNoEnum.yes.getFlag())) { if (response.getStatus().equals(YesNoEnum.yes.getFlag())) {
baseMapper.updateById(sOrder); baseMapper.updateById(sOrder);
//续费成功语音播报 //续费成功语音播报
...@@ -727,6 +729,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -727,6 +729,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override @Override
public void paymentSuccessful(SOrder sOrder) { public void paymentSuccessful(SOrder sOrder) {
if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) { if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
sOrder.setStartDate(sOrder.getPreStartDate()); sOrder.setStartDate(sOrder.getPreStartDate());
sOrder.setEndDate(sOrder.getPreEndDate()); sOrder.setEndDate(sOrder.getPreEndDate());
sOrder.setStatus(OrderStatusEnum.INUSE.getCode()); sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
...@@ -736,6 +739,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -736,6 +739,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject jsonObject = new JSONObject(map); JSONObject jsonObject = new JSONObject(map);
redisUtils.set(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + sOrder.getOrderNo(), jsonObject.toString()); redisUtils.set(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + sOrder.getOrderNo(), jsonObject.toString());
} else if (sOrder.getOrderType().equals(OrderTypeEnum.RESERVER.getCode())) { } else if (sOrder.getOrderType().equals(OrderTypeEnum.RESERVER.getCode())) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo()); map.put("orderNo", sOrder.getOrderNo());
map.put("expirationTime", sOrder.getPreStartDate().toString()); map.put("expirationTime", sOrder.getPreStartDate().toString());
...@@ -990,7 +994,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -990,7 +994,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
device1.setRoomId(sOrder.getRoomId()); device1.setRoomId(sOrder.getRoomId());
device1.setDevType(DeviceType.DEVICE_0001.getCode()); device1.setDevType(DeviceType.DEVICE_0001.getCode());
redisUtils.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo()); redisUtils.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo());
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
//开门、取电 //开门、取电
deviceOpService.openDoor(sRoomVo.getId(), sOrder.getConsumerPhone()); deviceOpService.openDoor(sRoomVo.getId(), sOrder.getConsumerPhone());
//语音 //语音
......
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