代客下单调整
This commit is contained in:
@@ -390,16 +390,16 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
return shopTable;
|
||||
}
|
||||
|
||||
private int getCurrentPlaceNum(String tableId, String shopId, String useType) {
|
||||
String currentOrderKey = RedisConstant.getCurrentOrderKey(tableId,
|
||||
shopId);
|
||||
String orderId = redisTemplate.opsForValue().get(currentOrderKey);
|
||||
if (StrUtil.isBlank(orderId)) {
|
||||
return 1;
|
||||
}
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectOne(new LambdaQueryWrapper<TbOrderInfo>()
|
||||
.eq(TbOrderInfo::getUseType, useType)
|
||||
.eq(TbOrderInfo::getId, orderId).select(TbOrderInfo::getPlaceNum));
|
||||
/**
|
||||
* 获取当前台桌当前下单次数
|
||||
*
|
||||
* @param tableId 台桌id
|
||||
* @param shopId 店铺id
|
||||
* @param shopEatTypeInfoDTO 用餐类型
|
||||
* @return 对应的次数,为order最后次数+1
|
||||
*/
|
||||
private int getCurrentPlaceNum(String tableId, Object shopId, ShopEatTypeInfoDTO shopEatTypeInfoDTO) {
|
||||
TbOrderInfo orderInfo = getCurrentOrder(shopEatTypeInfoDTO, tableId, shopId);
|
||||
return orderInfo == null ? 1 : orderInfo.getPlaceNum() + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user