订单信息返回店铺id

This commit is contained in:
2024-09-26 09:58:12 +08:00
parent 2967eb5af7
commit 7636df4394
3 changed files with 7 additions and 6 deletions

View File

@@ -39,4 +39,6 @@ public class OrderVo {
private String useType;
private Integer shopId;
}

View File

@@ -555,6 +555,7 @@ public class CartService {
cashierCart.setUpdatedAt(Instant.now().toEpochMilli());
cashierCart.setPackFee(BigDecimal.ZERO);
cashierCart.setRefundNumber(0);
cashierCart.setTradeDay(DateUtils.getDay());
if(isVip==1){
cashierCart.setIsVip(Byte.parseByte("1"));
cashierCart.setTotalAmount(BigDecimal.ZERO);
@@ -776,10 +777,6 @@ public class CartService {
}
orderDetails.add(orderDetail);
if (StringUtils.isNotEmpty(cart.getOrderId())) {
orderId = Integer.valueOf(cart.getOrderId());
}
cart.setStatus(shopEatTypeInfoDTO.isDineInAfter() ? "create" : "final");
if (cart.getId() != null) {
mpCashierCartMapper.updateById(cart);
@@ -853,7 +850,8 @@ public class CartService {
// 设置餐位费
TbShopInfo shopInfo = mpShopInfoMapper.selectById(shopId);
if (!shopEatTypeInfoDTO.isTakeout() && shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee() == 0 && (orderInfo == null || orderInfo.getSeatCount() == null)) {
if (!shopEatTypeInfoDTO.isTakeout() && shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee() == 0
&& (orderInfo == null || orderInfo.getSeatCount() == null)) {
seatNum = jsonObject.getInteger("dinersNum");
if (seatNum == null) {
MsgException.throwException("dinersNum不能为空");
@@ -939,7 +937,7 @@ public class CartService {
}
for (TbOrderDetail orderDetail : orderDetails) {
orderDetail.setOrderId(orderId);
orderDetail.setOrderId(orderInfo.getId());
if (orderDetail.getId() != null) {
mpOrderDetailMapper.updateById(orderDetail);
}else {

View File

@@ -221,6 +221,7 @@ public class OrderService {
orderVo.setSendType(orderInfo.getSendType());
orderVo.setOutNumber(orderInfo.getOutNumber());
orderVo.setUseType(orderInfo.getUseType());
orderVo.setShopId(Integer.valueOf(orderInfo.getShopId()));
return Result.success(CodeEnum.ENCRYPT, orderVo);
}