From f87850bb6c6109a3bda06ab474575631407bbf09 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期五, 01 三月 2024 19:09:12 +0800
Subject: [PATCH] 爆款活动-退款处理

---
 phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java b/phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java
index 25d96b7..b81619a 100644
--- a/phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java
+++ b/phi_platform_user/src/main/java/com/hx/phip/tool/refund/PartialRefundUtil.java
@@ -189,7 +189,7 @@
         }
 
         //鐖嗘娲诲姩瑙勫垯閫�娆撅紝鏆傛椂涓嶅睆钄戒繚瀛樻彁绀�
-        activityPageGiveIncrease(ordersTotal,refundRecord,operationId,0,commonService);
+        activityPageGiveIncrease(ordersTotal,refundRecord,0,commonService);
 
         //鍒濆鍖栧垵澶嶈瘖淇℃伅
         if(OrderTotalConstants.STATUS_CANCEL == ordersTotal.getStatus()){
@@ -902,11 +902,10 @@
     /**椤甸潰娲诲姩璧犻�佺殑澧炲�奸噾閫�娆惧鐞�
      * @param ordersTotal 璁㈠崟
      * @param refundRecord 閫�娆捐鍗�
-     * @param operationId 鎿嶄綔浜烘爣璇�
      * @param circulateNum 閬垮厤姝诲惊鐜紝璋冪敤鐨勬椂鍊欎紶0
      * @param commonService 鏄犲皠
      */
-    public static void activityPageGiveIncrease(OrdersTotal ordersTotal,RefundRecord refundRecord,String operationId,int circulateNum,CommonService commonService){
+    public static void activityPageGiveIncrease(OrdersTotal ordersTotal,RefundRecord refundRecord,int circulateNum,CommonService commonService){
 
         if(circulateNum > 1){
             return;
@@ -932,8 +931,8 @@
         RefundUserAssets refundUserAssets;
         //鐢熸垚璁板綍
         refundUserAssets = new RefundUserAssets();
-        //璁剧疆鏈�102鏄綋鍓嶇殑璁板綍绫诲瀷
-        refundUserAssets.setIsDel(102);
+        //璁剧疆涓�102鏄綋鍓嶇殑璁板綍绫诲瀷
+        refundUserAssets.setIsDel(RefundUserAssets.DEL_BURST);
         refundUserAssets.setType(userMoneyUnclaimed.getOperationReason());
         refundUserAssets.setStatus(RefundUserAssets.STATUS_NORMAL);
         refundUserAssets.setAmountType(userMoneyUnclaimed.getFundType());
@@ -966,7 +965,7 @@
             sqlSentence.sqlWhere("isValid = #{m.isValid} WHERE id = #{m.id} AND status = #{m.status}",values);
             if(commonService.updateWhere(UserMoneyUnclaimedMapper.class,sqlSentence) != 1){
                 circulateNum++;
-                activityPageGiveIncrease(ordersTotal,refundRecord,operationId,circulateNum,commonService);
+                activityPageGiveIncrease(ordersTotal,refundRecord,circulateNum,commonService);
             }
         }
         //淇濆瓨璁板綍锛屾甯告墸鍑忓拰鏈鍙栨墠鍘讳繚瀛樿繖涓褰�
@@ -980,12 +979,12 @@
         values.put("activityPageType",ordersTotal.getActivityPageType());
         values.put("activityPageCode",ordersTotal.getActivityPageCode());
         sqlSentence.sqlSentence("SELECT * FROM orders_total WHERE isDel = 0 AND status != #{m.status} AND payStatus = #{m.payStatus}" +
-                " AND id != #{m.id} AND activityPageType = #{m.activityPageType} AND activityPageCode = #{m.activityPageCode} ORDER BY createTime ASC LIMIT 1",values);
+                " AND id != #{m.id} AND activityPageType = #{m.activityPageType} AND activityPageCode = #{m.activityPageCode} ORDER BY payTime ASC LIMIT 1",values);
         OrdersTotal ordersTotal1 = commonService.selectOne(OrdersTotalMapper.class,sqlSentence);
         if(ordersTotal1 != null){
-            Integer opType = BaseEntity.NO;
+            Integer opType = BaseEntity.YES;
             if(userMoneyUnclaimed.getStatus() == UserMoneyUnclaimed.STATUS_SUCCEED){
-                opType = BaseEntity.YES;
+                opType = BaseEntity.NO;
             }
             //澧炲�奸噾鍒拌处澶勭悊
             UserMoneyUtil.setUserMoneyHandle(userMoneyUnclaimed.getUserId(), UserMoneyUnclaimed.FUND_TYPE_VALUE_ADDED_FUND,userMoneyUnclaimed.getOpNumber(),opType, OperationReasonConstants.OP_REASON_INVITE_ORDER,userMoneyUnclaimed.getOriginSubject(),userMoneyUnclaimed.getRemarks(),userMoneyUnclaimed.getOperatorId()

--
Gitblit v1.8.0