Commit 5c90de78 by YG8999

Merge remote-tracking branch 'origin/main'

parents df069ea1 8265a46d
......@@ -46,10 +46,7 @@ public class RedisTask {
private ISRoomService roomService;
@Autowired
private MqttxService mqttxService;
@Autowired
private DeviceService deviceService;
private DeviceOpService deviceOpService;
public void AuToReceiptCode() {
......@@ -153,14 +150,7 @@ public class RedisTask {
if (b) {
//删除redis中的值
redisUtil.delete(o);
Device device = new Device();
device.setRoomId(sOrder.getRoomId());
device.setDevType(DeviceType.DEVICE_0001.getCode());
Device device1 = deviceService.selectDeviceList(device).get(0);
if (ObjectUtils.isEmpty(device1)) {
throw new BaseException("设备不存在!");
}
mqttxService.actionExecute(device.getDevId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getValue(),
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getValue(),
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
......@@ -178,13 +168,6 @@ public class RedisTask {
redisUtil.delete(o);
throw new BaseException("订单不存在!");
}
Device device = new Device();
device.setRoomId(sOrder.getRoomId());
device.setDevType(DeviceType.DEVICE_0001.getCode());
Device device1 = deviceService.selectDeviceList(device).get(0);
if (ObjectUtils.isEmpty(device1)) {
throw new BaseException("设备不存在!");
}
SOrder order = new SOrder();
order.setStoreId(sOrder.getStoreId());
order.setRoomId(sOrder.getRoomId());
......@@ -201,7 +184,7 @@ public class RedisTask {
isOrderService.updateById(sOrder);
return;
}
mqttxService.actionExecute(device.getDevId(), sOrder.getConsumerPhone(), value,
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), value,
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
}
......
......@@ -619,20 +619,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
//续费成功语音播报
if (sOrder.getOrderType().equals(OrderTypeEnum.RENEW.getCode())) {
SOrder sOrder1 = baseMapper.selectSOrderById(sOrder.getId());
//判断订单单是否存在
if (ObjectUtils.isEmpty(sOrder1)) {
redisUtil.delete(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + sOrder.getOrderNo());
throw new BaseException("订单不存在!");
}
Device device = new Device();
device.setRoomId(sOrder.getRoomId());
device.setDevType(DeviceType.DEVICE_0001.getCode());
Device device1 = deviceService.selectDeviceList(device).get(0);
if (ObjectUtils.isEmpty(device1)) {
throw new BaseException("设备不存在!");
}
mqttxService.actionExecute(device1.getDevId(), sOrder1.getConsumerPhone(), VoiceEnum.RENEWAL_SUCCESS.getValue(),
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.RENEWAL_SUCCESS.getValue(),
cn.hutool.core.date.DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
}
......
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