订单信息返回店铺id
This commit is contained in:
@@ -39,4 +39,6 @@ public class OrderVo {
|
|||||||
|
|
||||||
private String useType;
|
private String useType;
|
||||||
|
|
||||||
|
private Integer shopId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,6 +555,7 @@ public class CartService {
|
|||||||
cashierCart.setUpdatedAt(Instant.now().toEpochMilli());
|
cashierCart.setUpdatedAt(Instant.now().toEpochMilli());
|
||||||
cashierCart.setPackFee(BigDecimal.ZERO);
|
cashierCart.setPackFee(BigDecimal.ZERO);
|
||||||
cashierCart.setRefundNumber(0);
|
cashierCart.setRefundNumber(0);
|
||||||
|
cashierCart.setTradeDay(DateUtils.getDay());
|
||||||
if(isVip==1){
|
if(isVip==1){
|
||||||
cashierCart.setIsVip(Byte.parseByte("1"));
|
cashierCart.setIsVip(Byte.parseByte("1"));
|
||||||
cashierCart.setTotalAmount(BigDecimal.ZERO);
|
cashierCart.setTotalAmount(BigDecimal.ZERO);
|
||||||
@@ -776,10 +777,6 @@ public class CartService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
orderDetails.add(orderDetail);
|
orderDetails.add(orderDetail);
|
||||||
if (StringUtils.isNotEmpty(cart.getOrderId())) {
|
|
||||||
orderId = Integer.valueOf(cart.getOrderId());
|
|
||||||
}
|
|
||||||
|
|
||||||
cart.setStatus(shopEatTypeInfoDTO.isDineInAfter() ? "create" : "final");
|
cart.setStatus(shopEatTypeInfoDTO.isDineInAfter() ? "create" : "final");
|
||||||
if (cart.getId() != null) {
|
if (cart.getId() != null) {
|
||||||
mpCashierCartMapper.updateById(cart);
|
mpCashierCartMapper.updateById(cart);
|
||||||
@@ -853,7 +850,8 @@ public class CartService {
|
|||||||
|
|
||||||
// 设置餐位费
|
// 设置餐位费
|
||||||
TbShopInfo shopInfo = mpShopInfoMapper.selectById(shopId);
|
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");
|
seatNum = jsonObject.getInteger("dinersNum");
|
||||||
if (seatNum == null) {
|
if (seatNum == null) {
|
||||||
MsgException.throwException("dinersNum不能为空");
|
MsgException.throwException("dinersNum不能为空");
|
||||||
@@ -939,7 +937,7 @@ public class CartService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (TbOrderDetail orderDetail : orderDetails) {
|
for (TbOrderDetail orderDetail : orderDetails) {
|
||||||
orderDetail.setOrderId(orderId);
|
orderDetail.setOrderId(orderInfo.getId());
|
||||||
if (orderDetail.getId() != null) {
|
if (orderDetail.getId() != null) {
|
||||||
mpOrderDetailMapper.updateById(orderDetail);
|
mpOrderDetailMapper.updateById(orderDetail);
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ public class OrderService {
|
|||||||
orderVo.setSendType(orderInfo.getSendType());
|
orderVo.setSendType(orderInfo.getSendType());
|
||||||
orderVo.setOutNumber(orderInfo.getOutNumber());
|
orderVo.setOutNumber(orderInfo.getOutNumber());
|
||||||
orderVo.setUseType(orderInfo.getUseType());
|
orderVo.setUseType(orderInfo.getUseType());
|
||||||
|
orderVo.setShopId(Integer.valueOf(orderInfo.getShopId()));
|
||||||
|
|
||||||
return Result.success(CodeEnum.ENCRYPT, orderVo);
|
return Result.success(CodeEnum.ENCRYPT, orderVo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user