订单信息返回店铺id
This commit is contained in:
@@ -39,4 +39,6 @@ public class OrderVo {
|
||||
|
||||
private String useType;
|
||||
|
||||
private Integer shopId;
|
||||
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user