餐位费选择修改
This commit is contained in:
@@ -152,7 +152,7 @@ public class ProductService {
|
|||||||
if (shopEatTypeInfoDTO.isOpenDineIn()) {
|
if (shopEatTypeInfoDTO.isOpenDineIn()) {
|
||||||
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
|
TbOrderInfo order = getCurrentOrder(shopEatTypeInfoDTO, code, shopInfo.getId());
|
||||||
tbShopTable.setOrderId(order == null ? null : order.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.setChoseCount((shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee().equals(1)) || (seatCartInfo != null && (seatCartInfo.getNumber() != null)));
|
||||||
tbShopTable.setSeatNum(seatCartInfo != null ? seatCartInfo.getNumber() : 0);
|
tbShopTable.setSeatNum(seatCartInfo != null ? seatCartInfo.getNumber() : 0);
|
||||||
}else {
|
}else {
|
||||||
@@ -913,7 +913,7 @@ public class ProductService {
|
|||||||
|
|
||||||
Integer userId = TokenUtil.getUserId();
|
Integer userId = TokenUtil.getUserId();
|
||||||
|
|
||||||
TbCashierCart tbCashierCart = getSeatCartInfo(choseCountDTO.getShopId(), choseCountDTO.getTableId(), userId, shopEatTypeInfoDTO);
|
TbCashierCart tbCashierCart = getSeatCartInfo(choseCountDTO.getShopId(), choseCountDTO.getTableId(), shopEatTypeInfoDTO);
|
||||||
|
|
||||||
if (tbCashierCart == null) {
|
if (tbCashierCart == null) {
|
||||||
tbCashierCart = new TbCashierCart();
|
tbCashierCart = new TbCashierCart();
|
||||||
@@ -969,7 +969,7 @@ public class ProductService {
|
|||||||
}, stringRedisTemplate, RedisCst.getLockKey(RedisCst.CHOSE_TABLE_COUNT, choseCountDTO.getShopId(), choseCountDTO.getTableId()));
|
}, 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>()
|
LambdaQueryWrapper<TbCashierCart> query = new LambdaQueryWrapper<TbCashierCart>()
|
||||||
.eq(TbCashierCart::getShopId, shopId)
|
.eq(TbCashierCart::getShopId, shopId)
|
||||||
.eq(TbCashierCart::getProductId, TableConstant.CART_SEAT_ID)
|
.eq(TbCashierCart::getProductId, TableConstant.CART_SEAT_ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user