Quellcode durchsuchen

修改订单还原库存

lishiqiang vor 3 Wochen
Ursprung
Commit
472437f60c

+ 17 - 0
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/dal/dataobject/order/TradeOrderTotalDO.java

@@ -1,6 +1,7 @@
 package com.yc.ship.module.trade.dal.dataobject.order;
 
 import com.yc.ship.framework.tenant.core.db.TenantBaseDO;
+import com.yc.ship.module.trade.framework.annotation.ForUpdate;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
 
@@ -36,60 +37,76 @@ public class TradeOrderTotalDO extends TenantBaseDO {
     /**
      * 成人总数
      */
+    @ForUpdate(fieldName = "成人总数")
     private Integer adultTotalNum;
     /**
      * 儿童总数
      */
+    @ForUpdate(fieldName = "儿童总数")
     private Integer childTotalNum;
     /**
      * 婴儿总数
      */
+    @ForUpdate(fieldName = "婴儿总数")
     private Integer babyTotalNum;
     /**
      * 陪同总数
      */
+    @ForUpdate(fieldName = "陪同总数")
     private Integer withTotalNum;
     /**
      * 用房总数
      */
+    @ForUpdate(fieldName = "用房总数")
     private Double useRoomTotalNum;
     /**
      * 升楼层总数
      */
+    @ForUpdate(fieldName = "升楼层总数")
     private Integer upFloorTotalNum;
     /**
      * 升楼层总价
      */
+    @ForUpdate(fieldName = "升楼层总价")
     private BigDecimal upFloorTotalMoney;
     /**
      * 总加床人数
      */
+    @ForUpdate(fieldName = "总加床人数")
     private Integer plusTotalNum;
     /**
      * 调节总价
      */
+    @ForUpdate(fieldName = "调节总价")
     private BigDecimal adjustTotalMoney;
     /**
      * 领队数
      */
+    @ForUpdate(fieldName = "领队数")
     private Integer leaderTotalNum;
     /**
      * 包含服务费
      */
+    @ForUpdate(fieldName = "包含服务费")
     private BigDecimal serviceMoney;
     /**
      * 代收服务费
      */
+    @ForUpdate(fieldName = "代收服务费")
     private BigDecimal collectionServiceMoney;
     /**
      * 订单总额
      */
+    @ForUpdate(fieldName = "订单总额")
     private BigDecimal orderMoney;
 
+    @ForUpdate(fieldName = "实际金额")
     private BigDecimal realMoney;
 
+    @ForUpdate(fieldName = "其它费用")
     private BigDecimal otherMoney;
 
+    @ForUpdate(fieldName = "其它备注")
     private String otherRemark;
 
 }

+ 1 - 1
ship-module-trade/ship-module-trade-biz/src/main/java/com/yc/ship/module/trade/service/order/handler/TradeStockOrderHandler.java

@@ -112,7 +112,7 @@ public class TradeStockOrderHandler implements TradeOrderHandler{
         reqDTO.setOrderRoomList(orderRoomUseDTOList);
         Integer orderStatus = reqDTO.getOrderStatus();
         if(Objects.equals(orderStatus, TradeOrderStatusEnum.YD.getStatus())) {
-            voyageApi.preReduceStock(reqDTO);
+            voyageApi.preCancelReduceStock(reqDTO);
         }else {
             voyageApi.cancelReduceStock(reqDTO);
         }