From 46a9c5e82eeb3b4d657663bdb3ee07d3ce7849e5 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期四, 29 二月 2024 19:19:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/chenjiahe-爆款活动' into chenjiahe-爆款活动

---
 phi_platform_user/src/main/java/com/hx/phip/service/userMoney/impl/UserMoneyUnclaimedServiceImpl.java |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/phi_platform_user/src/main/java/com/hx/phip/service/userMoney/impl/UserMoneyUnclaimedServiceImpl.java b/phi_platform_user/src/main/java/com/hx/phip/service/userMoney/impl/UserMoneyUnclaimedServiceImpl.java
index b9e2bba..3bb778a 100644
--- a/phi_platform_user/src/main/java/com/hx/phip/service/userMoney/impl/UserMoneyUnclaimedServiceImpl.java
+++ b/phi_platform_user/src/main/java/com/hx/phip/service/userMoney/impl/UserMoneyUnclaimedServiceImpl.java
@@ -575,7 +575,8 @@
 
         // 鏈夎鍒�,涓旇鍒欎笉闇�瑕佹牎楠岀敤鎴峰嬀閫�,鍒欐牎楠屽熀纭�瑙勫垯涓槸鍚﹂渶瑕侀鍙�
         if (moneyRule != null && moneyRule.getIsUserReceive().equals(BaseEntity.NO)){
-            logger.info("鎿嶄綔鐢ㄦ埛璧勯噾(寰呴鍙栬褰�)-涓嶆牎楠岀敤鎴疯缃槸鍚﹂渶瑕侀鍙栫姸鎬�-鏄惁闇�瑕佺敤鎴烽鍙栵細"+moneyRule.getIsNeedReceive());
+            logger.info("鎿嶄綔鐢ㄦ埛璧勯噾(寰呴鍙栬褰�)-涓嶆牎楠岀敤鎴疯缃槸鍚﹂渶瑕侀鍙栫姸鎬�");
+            logger.info("鎿嶄綔鐢ㄦ埛璧勯噾(寰呴鍙栬褰�)-鏄惁闇�瑕佺敤鎴烽鍙栵細"+moneyRule.getIsNeedReceive());
             if (moneyRule.getIsNeedReceive().equals(BaseEntity.NO)){
                 //涓嶉渶瑕侀鍙�,璁剧疆涓虹郴缁熷鐞�
                 userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_SYSTEM);
@@ -591,7 +592,7 @@
                 if (userInfo != null){
                     logger.info("鎿嶄綔鐢ㄦ埛璧勯噾(寰呴鍙栬褰�)-鐢ㄦ埛璁剧疆澧炲�奸噾鏄惁闇�瑕侀鍙栫姸鎬侊細{}", userInfo.getIsReceiveValueAddedFund());
                     if (userInfo.getIsReceiveValueAddedFund() != null  && BaseEntity.YES.equals(userInfo.getIsReceiveValueAddedFund())){
-                        // 鐢ㄦ埛璁剧疆浜嗕笉鐢ㄥ啀棰嗗彇,璁剧疆涓虹郴缁熷鐞�
+                        // 璁剧疆瑕侀鍙栬缃负棰嗗彇
                         userMoneyUnclaimed.setOpType(UserMoneyUnclaimed.OP_TYPE_RECEIVE);
                     }
                 }
@@ -780,22 +781,32 @@
                 Date limitEndTime = null;
                 //鏈夐檺鍒舵椂闂磋鍒�
                 if (StringUtils.noNull(userMoneyUnclaimed.getMoneyRuleId())){
-                    if (userMoneyUnclaimed.getReceiveMoneyLimit() != null && userMoneyUnclaimed.getReceiveMoneyLimit().equals(BaseEntity.YES)){
-                        //瑕侀鍙栫殑璧勯噾鍒ゆ柇鏄惁婊¤冻鏉′欢
-                        if (UserMoneyUnclaimed.OP_TYPE_RECEIVE == userMoneyUnclaimed.getOpType() && checkCanNotReceive(userMoneyUnclaimed)){
-                            throw new PlatTipsException(PlatformCode.ERROR_TIPS,"棰嗗彇澶辫触,鏈弧瓒抽鍙栨潯浠�");
+                    //闇�瑕侀鍙�,鏈夐鍙栭檺鍒� 鍒欐牎楠屾槸鍚︽弧瓒虫潯浠�
+                    if (UserMoneyUnclaimed.OP_TYPE_RECEIVE == userMoneyUnclaimed.getOpType()){
+                        if (userMoneyUnclaimed.getReceiveMoneyLimit() != null
+                                && userMoneyUnclaimed.getReceiveMoneyLimit().equals(BaseEntity.YES)
+                                && checkCanNotReceive(userMoneyUnclaimed)) {
+                            logger.info("鎿嶄綔寰呴鍙栬祫閲�-浣嗘槸鏈夐鍙栭檺鍒�-杩涜闄愬埗鏍¢獙");
+                            throw new PlatTipsException(PlatformCode.ERROR_TIPS, "棰嗗彇澶辫触,鏈弧瓒抽鍙栨潯浠�");
                         }
-                        //鏈夐檺鍒�,闄愬埗缁撴潫鏃堕棿璁$畻
-                        logger.info("寰呴鍙栬祫浜у鐞�,鏁版嵁id锛歿},鍏宠仈瑙勫垯闄愬埗澶╂暟{}",userMoneyUnclaimed.getId(),userMoneyUnclaimed.getWaitReceiveLimitDay());
-                        limitEndTime = DateUtil.addDay(userMoneyUnclaimed.getLimitStartTime(),userMoneyUnclaimed.getWaitReceiveLimitDay());
+                    }
+                    //鏈夐鍙栧悗鐨勬椂闂撮檺鍒�,闄愬埗缁撴潫鏃堕棿璁$畻
+                    logger.info("鎿嶄綔寰呴鍙栬祫閲�-鏄惁鏈夋晥鏃堕棿闄愬埗锛�" + userMoneyUnclaimed.getReceiveMoneyLimit());
+                    if (userMoneyUnclaimed.getReceiveMoneyLimit() != null && userMoneyUnclaimed.getReceiveMoneyLimit().equals(BaseEntity.YES)){
+                        logger.info("鎿嶄綔寰呴鍙栬祫閲�-闄愬埗鏈夋晥澶╂暟锛�" + userMoneyUnclaimed.getReceiveMoneyLimitDay());
+                        //涓虹┖榛樿澶勭悊
+                        if (userMoneyUnclaimed.getReceiveMoneyLimitDay() == null) {
+                            userMoneyUnclaimed.setReceiveMoneyLimitDay(UserMoneyTool.getReceivedValidityTime(commonService));
+                        }
+                        limitEndTime = DateUtil.addDay(userMoneyUnclaimed.getLimitStartTime(), userMoneyUnclaimed.getReceiveMoneyLimitDay());
                     }else {
+                        logger.info("鎿嶄綔寰呴鍙栬祫閲�-鏈缃湁鏁堟椂闂撮檺鍒�-榛樿缁�100骞�");
                         //鏃犻檺鍒�,榛樿100骞�
                         limitEndTime = DateUtil.addYear(userMoneyUnclaimed.getLimitStartTime(), 100);
                     }
                 }else {
-                    // 宸查鍙栬皟鏁撮鍙栨椂闂�
+                    // 榛樿澶勭悊
                     int validityPeriod = UserMoneyTool.getReceivedValidityTime(commonService);
-                    // 鑾峰彇鏃堕棿
                     limitEndTime = DateUtil.addDay(userMoneyUnclaimed.getLimitStartTime(), validityPeriod);
                 }
                 // 浼犺繘鍘讳笅闈㈢殑璧勯噾澶勭悊

--
Gitblit v1.8.0