Commit 5d12a19d by 吕明尚

语音提醒更改接口

parent 8877557e
...@@ -46,10 +46,7 @@ public class RedisTask { ...@@ -46,10 +46,7 @@ public class RedisTask {
private ISRoomService roomService; private ISRoomService roomService;
@Autowired @Autowired
private MqttxService mqttxService; private DeviceOpService deviceOpService;
@Autowired
private DeviceService deviceService;
public void AuToReceiptCode() { public void AuToReceiptCode() {
...@@ -153,14 +150,7 @@ public class RedisTask { ...@@ -153,14 +150,7 @@ public class RedisTask {
if (b) { if (b) {
//删除redis中的值 //删除redis中的值
redisUtil.delete(o); redisUtil.delete(o);
Device device = new Device(); deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getValue(),
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(),
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN), DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1"); DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1");
...@@ -178,13 +168,6 @@ public class RedisTask { ...@@ -178,13 +168,6 @@ public class RedisTask {
redisUtil.delete(o); redisUtil.delete(o);
throw new BaseException("订单不存在!"); 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(); SOrder order = new SOrder();
order.setStoreId(sOrder.getStoreId()); order.setStoreId(sOrder.getStoreId());
order.setRoomId(sOrder.getRoomId()); order.setRoomId(sOrder.getRoomId());
...@@ -201,7 +184,7 @@ public class RedisTask { ...@@ -201,7 +184,7 @@ public class RedisTask {
isOrderService.updateById(sOrder); isOrderService.updateById(sOrder);
return; 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(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1"); DateUtil.format(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