fix: 订单信息返回霸王餐信息

This commit is contained in:
张松
2024-11-19 17:37:21 +08:00
parent 40f90128ab
commit 43303a76af
2 changed files with 6 additions and 18 deletions

View File

@@ -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());
}

View File

@@ -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<TbFreeDineConfig>()
.eq(TbFreeDineConfig::getShopId, shopInfo.getId())));
return map;
}
}