Commit 8877557e by YG8999

Merge remote-tracking branch 'origin/main'

parents f44e14a4 330143dd
...@@ -185,6 +185,22 @@ public class RedisTask { ...@@ -185,6 +185,22 @@ public class RedisTask {
if (ObjectUtils.isEmpty(device1)) { if (ObjectUtils.isEmpty(device1)) {
throw new BaseException("设备不存在!"); throw new BaseException("设备不存在!");
} }
SOrder order = new SOrder();
order.setStoreId(sOrder.getStoreId());
order.setRoomId(sOrder.getRoomId());
order.setConsumerId(sOrder.getConsumerId());
order.setOrderType(OrderTypeEnum.RENEW.getCode());
order.setStatus(OrderStatusEnum.UNUSED.getCode());
//查询当前订单下是否存在未使用的续费订单
List<SOrder> sOrders = isOrderService.selectSOrderList(order);
if (!CollectionUtils.isEmpty(sOrders)) {
//删除当前的订单
redisUtil.delete(o);
//更改订单状态
sOrder.setStatus(OrderStatusEnum.USED.getCode());
isOrderService.updateById(sOrder);
return;
}
mqttxService.actionExecute(device.getDevId(), sOrder.getConsumerPhone(), value, mqttxService.actionExecute(device.getDevId(), 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