From 43303a76afc594bcd1ec5106d2c88365e326e59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 19 Nov 2024 17:37:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=9C=B8=E7=8E=8B=E9=A4=90=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/CartService.java | 10 ---------- .../cashierservice/service/OrderService.java | 14 ++++++-------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java index 9b3f5b2..b6d25f9 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java @@ -1328,16 +1328,6 @@ public class CartService { throw new MsgException("请选择就餐人数"); } if (allCartList.isEmpty() || (shopEatTypeInfoDTO.isNeedSeatFee() && allCartList.size() < 2)) { -// log.info("消息推送"); -// JSONObject responseData = new JSONObject(); -// responseData.put("msg", "购物车为空"); -// if (shopTable.getMaxCapacity() < seatNum) { -// responseData.put("msg", "当前台桌最大人数为: " + shopTable.getMaxCapacity()); -// } -// responseData.put("status", "fail"); -// responseData.put("type", orderDTO.getType()); -// responseData.put("data", ""); -// PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(responseData.toString(), tableCartKey, userId, true); throw new MsgException("当前台桌最大人数为: " + shopTable.getMaxCapacity()); } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java index 466667f..f2a0e9e 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -9,15 +9,9 @@ import com.chaozhanggui.system.cashierservice.dao.TbOrderDetailMapper; import com.chaozhanggui.system.cashierservice.dao.TbOrderInfoMapper; import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper; import com.chaozhanggui.system.cashierservice.dao.TbShopTableMapper; -import com.chaozhanggui.system.cashierservice.entity.TbOrderDetail; -import com.chaozhanggui.system.cashierservice.entity.TbOrderInfo; -import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; -import com.chaozhanggui.system.cashierservice.entity.TbShopTable; +import com.chaozhanggui.system.cashierservice.entity.*; import com.chaozhanggui.system.cashierservice.entity.vo.OrderVo; -import com.chaozhanggui.system.cashierservice.mapper.MpCashierCartMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpOrderDetailMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpOrderInfoMapper; -import com.chaozhanggui.system.cashierservice.mapper.MpShopInfoMapper; +import com.chaozhanggui.system.cashierservice.mapper.*; import com.chaozhanggui.system.cashierservice.sign.CodeEnum; import com.chaozhanggui.system.cashierservice.sign.Result; import com.github.pagehelper.PageHelper; @@ -62,6 +56,8 @@ public class OrderService { private MpOrderInfoMapper mpOrderInfoMapper; @Autowired private MpShopInfoMapper mpShopInfoMapper; + @Autowired + private TbFreeDineConfigMapper freeDineConfigMapper; /** * 创建订单 @@ -328,6 +324,8 @@ public class OrderService { map.put("createdAt", DateUtil.formatDateTime(DateUtil.date(orderInfo.getCreatedAt()))); map.put("paidTime", orderInfo.getPaidTime() == null ? null : DateUtil.formatDateTime(DateUtil.date(orderInfo.getPaidTime()))); map.put("registerType", shopInfo.getRegisterType()); + map.put("freeDingConfig", freeDineConfigMapper.selectOne(new LambdaQueryWrapper() + .eq(TbFreeDineConfig::getShopId, shopInfo.getId()))); return map; } }