餐位费选择修改

This commit is contained in:
2024-10-10 09:46:09 +08:00
parent 5f09f94657
commit 7315605bf0

View File

@@ -152,7 +152,7 @@ public class ProductService {
if (shopEatTypeInfoDTO.isOpenDineIn()) {
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
tbShopTable.setOrderId(order == null ? null : order.getId());
TbCashierCart seatCartInfo = getSeatCartInfo(tbShopTable.getShopId(), tbShopTable.getQrcode(), Integer.valueOf(userId), shopEatTypeInfoDTO);
TbCashierCart seatCartInfo = getSeatCartInfo(tbShopTable.getShopId(), tbShopTable.getQrcode(), shopEatTypeInfoDTO);
tbShopTable.setChoseCount((shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee().equals(1)) || (seatCartInfo != null && (seatCartInfo.getNumber() != null)));
tbShopTable.setSeatNum(seatCartInfo != null ? seatCartInfo.getNumber() : 0);
}else {
@@ -913,7 +913,7 @@ public class ProductService {
Integer userId = TokenUtil.getUserId();
TbCashierCart tbCashierCart = getSeatCartInfo(choseCountDTO.getShopId(), choseCountDTO.getTableId(), userId, shopEatTypeInfoDTO);
TbCashierCart tbCashierCart = getSeatCartInfo(choseCountDTO.getShopId(), choseCountDTO.getTableId(), shopEatTypeInfoDTO);
if (tbCashierCart == null) {
tbCashierCart = new TbCashierCart();
@@ -969,7 +969,7 @@ public class ProductService {
}, stringRedisTemplate, RedisCst.getLockKey(RedisCst.CHOSE_TABLE_COUNT, choseCountDTO.getShopId(), choseCountDTO.getTableId()));
}
private TbCashierCart getSeatCartInfo(Object shopId, String tableId, Integer userId, ShopEatTypeInfoDTO shopEatTypeInfoDTO) {
private TbCashierCart getSeatCartInfo(Object shopId, String tableId, ShopEatTypeInfoDTO shopEatTypeInfoDTO) {
LambdaQueryWrapper<TbCashierCart> query = new LambdaQueryWrapper<TbCashierCart>()
.eq(TbCashierCart::getShopId, shopId)
.eq(TbCashierCart::getProductId, TableConstant.CART_SEAT_ID)