Commit feb38f65 by 吕明尚

退款断电

parent 5ec2a8d4
...@@ -204,7 +204,7 @@ public class RedisTask { ...@@ -204,7 +204,7 @@ public class RedisTask {
deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getCode(), deviceOpService.actionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.SEND_CUSTOMER.getCode(),
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");
//延时5分钟断电 //延时3分钟断电
deviceOpService.openOrCloseDevice(sOrder.getRoomId(), sOrder.getConsumerPhone(), OpTypeEnum.CUT_ELECTRIC.getCode(), true, THREE_MINUTES); deviceOpService.openOrCloseDevice(sOrder.getRoomId(), sOrder.getConsumerPhone(), OpTypeEnum.CUT_ELECTRIC.getCode(), true, THREE_MINUTES);
} }
} }
...@@ -249,6 +249,15 @@ public class RedisTask { ...@@ -249,6 +249,15 @@ public class RedisTask {
this.sOrder = sOrder; this.sOrder = sOrder;
this.device = device; this.device = device;
} }
}
public void yvying(Long roomId) {
deviceOpService.asyncActionExecute(roomId, "13724108012", VoiceEnum.OPEN.getCode(),
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", 10L);
} }
} }
...@@ -769,6 +769,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -769,6 +769,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if (isRefund) { if (isRefund) {
// 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信 // 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信
redisUtils.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo()); redisUtils.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + sOrder.getOrderNo());
//房间断电
deviceOpService.openOrCloseDevice(sOrder.getRoomId(), sOrder.getConsumerPhone(), OpTypeEnum.CUT_ELECTRIC.getCode(), true, 5);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -916,7 +918,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -916,7 +918,11 @@ 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());
baseMapper.updateById(sOrder); baseMapper.updateById(sOrder);
//更改房间状态
SRoom sRoom = new SRoom();
sRoom.setId(sOrder.getRoomId());
sRoom.setStatus(RoomStatusEnum.HOLD.getValue());
roomService.updateById(sRoom);
Device device1 = new Device(); Device device1 = new Device();
device1.setRoomId(sOrder.getRoomId()); device1.setRoomId(sOrder.getRoomId());
device1.setDevType(DeviceType.DEVICE_0001.getCode()); device1.setDevType(DeviceType.DEVICE_0001.getCode());
......
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