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; } }