Merge branch 'prod' into test
This commit is contained in:
@@ -1609,6 +1609,22 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||||||
.update();
|
.update();
|
||||||
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
redisService.del(RedisCst.classKeyExpired.EXPIRED_ORDER + orderInfo.getId());
|
||||||
rabbitPublisher.sendOrderCancelMsg(orderInfo.getId().toString());
|
rabbitPublisher.sendOrderCancelMsg(orderInfo.getId().toString());
|
||||||
|
|
||||||
|
// 还原台桌状态
|
||||||
|
if (StrUtil.isNotBlank(orderInfo.getTableCode())) {
|
||||||
|
ShopTable table = shopTableService.getOneByTableCode(orderInfo.getShopId(), orderInfo.getTableCode());
|
||||||
|
if (table != null) {
|
||||||
|
ShopInfo shopInfo = shopInfoService.getById(orderInfo.getShopId());
|
||||||
|
if ("auto".equals(shopInfo.getTableClearType())) {
|
||||||
|
table.setStatus(ShopTableStatusEnum.IDLE.getValue());
|
||||||
|
} else {
|
||||||
|
DateTime dateTime = DateUtil.offsetMinute(DateUtil.date(), shopInfo.getTableClearTime());
|
||||||
|
table.setCreateTime(LocalDateTimeUtil.of(dateTime));
|
||||||
|
redisService.set(RedisCst.classKeyExpired.EXPIRED_TABLE + table.getId(), "", 60L * shopInfo.getTableClearTime());
|
||||||
|
}
|
||||||
|
shopTableService.updateById(table);
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user