就餐模式获取修改

This commit is contained in:
2024-09-29 14:43:33 +08:00
parent d8bfa7274e
commit 6327b6cd3b

View File

@@ -789,6 +789,15 @@ public class CartService {
// 所有订单信息
List<TbCashierCart> cashierCartList = mpCashierCartMapper.selectList(queryWrapper);
if (cashierCartList.isEmpty()) {
responseData.put("status", "fail");
responseData.put("msg", "购物车为空");
responseData.put("data", new ArrayList<>());
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(responseData.toString(), tableCartKey, jsonObject.getString("userId"), true);
return;
}
// 就餐人数
ArrayList<Integer> cashierIds = new ArrayList<>();
@@ -823,13 +832,6 @@ public class CartService {
return;
}
if (cashierIds.isEmpty() || (cashierIds.size() == 1 && !shopEatTypeInfoDTO.isTakeout())) {
responseData.put("status", "fail");
responseData.put("msg", "购物车为空");
responseData.put("data", new ArrayList<>());
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(responseData.toString(), tableCartKey, jsonObject.getString("userId"), true);
return;
}
TbShopUser tbShopUser = shopUserMapper.selectByUserIdAndShopId(userId, shopId);
boolean isVip = tbShopUser != null && tbShopUser.getIsVip().equals((byte) 1);