Browse Source

Rockt 报文添加新增功能(存入测试表)

zhaoxian 7 months ago
parent
commit
92fcf4ec69

+ 2 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/SupplyChainMapper.java

@@ -221,6 +221,7 @@ public interface SupplyChainMapper {
     int updateMgsOrderRegimentalSettleAmount(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
 
     int updateRocketOrderRegimentalSettleAmount(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
+    int updateRocketOrderRegimentalSettleAmountCS(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
 
     int updateYufuOrderRegimentalSettleAmount(@Param("oid") Long oid, @Param("cpsOrderStatus") Integer cpsOrderStatus);
 
@@ -269,4 +270,5 @@ public interface SupplyChainMapper {
     List<JSONObject> getBytedanceCourtshipGmvHourByDateRoi(@Param("userList") List<Long> userList, @Param("date") Long date, @Param("hourType") Integer hourType);
 
     void rinsertOne(@Param("ownership") String ownership, @Param("supplyChain") KuaishouSupplyChain supplyChain);
+
 }

+ 8 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/SupplyChainServiceImpl.java

@@ -806,13 +806,14 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
                 if (!Check.isNull(itemCheck)) {
                     ownership = itemCheck.getOwnership();
                 }
-                supplyChainMapper.rinsertOne(ownership, supplyChain);
+                supplyChainMapper.rinsertOne("rocket", supplyChain);
             }  //更新
             else if (2 == messageType) {
                 Integer cpsOrderStatus = info.getInteger("cpsOrderStatus");
                 Long oid = info.getLong("oid");
                 if (cpsOrderStatus == 60 || cpsOrderStatus == 40) {
-                    Integer i = updateOrderRegimentalSettleAmount(oid, cpsOrderStatus);
+//                    Integer i = updateOrderRegimentalSettleAmount(oid, cpsOrderStatus);
+                    Integer i = updateOrderRegimentalSettleAmountCeshi(oid, cpsOrderStatus);
                     if (i <= 0) {
                         log.error("订单ID:{},状态:{} 修改失败", oid, cpsOrderStatus);
                     }
@@ -826,6 +827,11 @@ public class SupplyChainServiceImpl implements ISupplyChainService {
         }
     }
 
+    /*测完删除*/
+    private Integer updateOrderRegimentalSettleAmountCeshi(Long oid, Integer cpsOrderStatus) {
+        return supplyChainMapper.updateRocketOrderRegimentalSettleAmountCS(oid, cpsOrderStatus);
+    }
+
     @Override
     public void addList(String beginDate, String endDate, String pcursor) throws InterruptedException {
         String url = "https://openapi.kwaixiaodian.com";

+ 28 - 14
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -3197,20 +3197,20 @@
 
     <update id="updateRuiXuanOrderRegimentalSettleAmount">
         UPDATE ruixuan.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
-            <choose>
-                <when test='cpsOrderStatus == 60 '>
-                    total_regimental_settle_amount = regimental_promotion_amount
-                </when>
-                <otherwise>
-                    send_status = 1
-                </otherwise>
-            </choose>
+        SET order_status = #{cpsOrderStatus},
+        <choose>
+            <when test='cpsOrderStatus == 60 '>
+                total_regimental_settle_amount = regimental_promotion_amount
+            </when>
+            <otherwise>
+                send_status = 1
+            </otherwise>
+        </choose>
         WHERE oid = #{oid}
     </update>
     <update id="updateMgsOrderRegimentalSettleAmount">
         UPDATE miaogousi.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
+        SET order_status = #{cpsOrderStatus},
         <choose>
             <when test='cpsOrderStatus == 60 '>
                 total_regimental_settle_amount = regimental_promotion_amount
@@ -3223,7 +3223,21 @@
     </update>
     <update id="updateRocketOrderRegimentalSettleAmount">
         UPDATE rocket.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
+        SET order_status = #{cpsOrderStatus},
+        <choose>
+            <when test='cpsOrderStatus == 60 '>
+                total_regimental_settle_amount = regimental_promotion_amount
+            </when>
+            <otherwise>
+                send_status = 1
+            </otherwise>
+        </choose>
+        WHERE oid = #{oid}
+    </update>
+
+    <update id="updateRocketOrderRegimentalSettleAmountCS">
+        UPDATE rocket.kuaishou_supply_chain_ceshi
+        SET order_status = #{cpsOrderStatus},
         <choose>
             <when test='cpsOrderStatus == 60 '>
                 total_regimental_settle_amount = regimental_promotion_amount
@@ -3237,7 +3251,7 @@
 
     <update id="updateYufuOrderRegimentalSettleAmount">
         UPDATE yufu.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
+        SET order_status = #{cpsOrderStatus},
         <choose>
             <when test='cpsOrderStatus == 60 '>
                 total_regimental_settle_amount = regimental_promotion_amount
@@ -3251,7 +3265,7 @@
 
     <update id="updateYuxiuOrderRegimentalSettleAmount">
         UPDATE yuxiu.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
+        SET order_status = #{cpsOrderStatus},
         <choose>
             <when test='cpsOrderStatus == 60 '>
                 total_regimental_settle_amount = regimental_promotion_amount
@@ -3265,7 +3279,7 @@
 
     <update id="updateZhishuiOrderRegimentalSettleAmount">
         UPDATE zhishui.kuaishou_supply_chain
-        SET order_status                   = #{cpsOrderStatus},
+        SET order_status = #{cpsOrderStatus},
         <choose>
             <when test='cpsOrderStatus == 60 '>
                 total_regimental_settle_amount = regimental_promotion_amount