Commit 1bb3bcce by 吕明尚

Merge branch 'dev' into test

parents 1adc4186 7b76485f
......@@ -598,7 +598,7 @@ public class MqttxServiceImpl implements MqttxService {
}
}
}
if (dev != null && !status.equals(dev.getStatus())) {
if (dev != null && StrUtil.isNotEmpty(dev.getStatus()) && !status.equals(dev.getStatus())) {
DeviceStatusLog deviceStatusLog = new DeviceStatusLog();
deviceStatusLog.setDevId(devId);
deviceStatusLog.setDevMac(dev.getDevMac());
......
......@@ -357,6 +357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
consumerCoupon.setUseStatus(UserStatusEnum.USED.getCode());
consumerCouponService.updateById(consumerCoupon);
}
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
sConsumptionRecordsService.insertSConsumptionRecords(sOrder);
Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo());
......@@ -372,6 +373,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
//支付金额为0的
if (request.getPayFee().compareTo(BigDecimal.ZERO) <= 0) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
if (response.getStatus().equals(YesNoEnum.yes.getFlag())) {
baseMapper.updateById(sOrder);
//续费成功语音播报
......@@ -727,6 +729,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override
public void paymentSuccessful(SOrder sOrder) {
if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
sOrder.setStartDate(sOrder.getPreStartDate());
sOrder.setEndDate(sOrder.getPreEndDate());
sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
......@@ -736,6 +739,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject jsonObject = new JSONObject(map);
redisUtils.set(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + sOrder.getOrderNo(), jsonObject.toString());
} else if (sOrder.getOrderType().equals(OrderTypeEnum.RESERVER.getCode())) {
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
Map<String, String> map = new HashMap<>();
map.put("orderNo", sOrder.getOrderNo());
map.put("expirationTime", sOrder.getPreStartDate().toString());
......@@ -990,7 +994,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
device1.setRoomId(sOrder.getRoomId());
device1.setDevType(DeviceType.DEVICE_0001.getCode());
redisUtils.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo());
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.RESERVER);
//开门、取电
deviceOpService.openDoor(sRoomVo.getId(), sOrder.getConsumerPhone());
//语音
......
......@@ -549,13 +549,13 @@ public class WechatNewServiceImpl implements WechatNewService {
if (messageReminderEnum.equals(MessageReminderEnum.RESERVER)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.RESERVER.getValue());
//订单门店
data.put("thing5", new SendTemplateMessageItemVo("武汉" + sStore.getName()));
data.put("thing3", new SendTemplateMessageItemVo("武汉" + sStore.getName()));
//服务名称
data.put("thin6", new SendTemplateMessageItemVo(sRoomVo.getName()));
data.put("thing1", new SendTemplateMessageItemVo(sRoomVo.getName()));
//订单时间
data.put("time7", new SendTemplateMessageItemVo(date));
data.put("date2", new SendTemplateMessageItemVo(preStartDateStr));
//温馨提示
data.put("thing4", new SendTemplateMessageItemVo(MessageReminderEnum.RESERVER.getTips()));
data.put("thing6", new SendTemplateMessageItemVo(MessageReminderEnum.RESERVER.getTips()));
} else if (messageReminderEnum.equals(MessageReminderEnum.START)) {
templateMessageVo.setTemplate_id(MessageReminderEnum.START.getValue());
//预约门店
......
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