From d1d0b4b9f4452fb6e9b6e39168f503d5b302c999 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 11 一月 2022 11:26:35 +0800
Subject: [PATCH] 部分功能添加

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java |   46 ++++++++++++++++++++++++++++++++--------------
 1 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
index 8c1d6a4..9e566ec 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -5,10 +5,7 @@
 import java.math.BigDecimal;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import javax.annotation.Resource;
 
@@ -19,6 +16,7 @@
 import com.yeshi.fanli.lijin.manager.GoodsLijinMnager;
 import com.yeshi.fanli.lijin.manager.UserLijinMnager;
 import com.yeshi.fanli.service.inter.pdd.PDDAuthService;
+import com.yeshi.fanli.service.inter.user.*;
 import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
 import com.yeshi.fanli.service.manger.PIDManager;
 import com.yeshi.fanli.util.*;
@@ -89,10 +87,6 @@
 import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
 import com.yeshi.goods.facade.service.DaTaoKeGoodsDetailV2Service;
-import com.yeshi.fanli.service.inter.user.ShamUserService;
-import com.yeshi.fanli.service.inter.user.TBPidService;
-import com.yeshi.fanli.service.inter.user.UserGoodsStorageService;
-import com.yeshi.fanli.service.inter.user.UserInfoService;
 import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
 import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
 import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
@@ -231,6 +225,9 @@
 
     @Resource
     private UserLijinMnager userLijinMnager;
+
+    @Resource
+    private UserFunctionsLimitService userFunctionsLimitService;
 
     private GoodsMoneyConfigParamsDTO getParamsDTO(String platform, String version, Long uid, SystemEnum system) {
         UserLevelEnum level = UserLevelEnum.daRen;
@@ -633,7 +630,7 @@
         } else {// 鏅�氳喘涔�
             OtherInfo otherInfo = new OtherInfo();
             RewardCouponVO rewardCoupon = new RewardCouponVO();
-            rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+            rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",acceptData.getSystem()));
             JSONObject params1 = new JSONObject();
             if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
                 params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(), acceptData.getSystem()));
@@ -790,7 +787,7 @@
         // 濂栧姳鍒歌繑鍒�
         RewardCouponVO rewardCoupon = new RewardCouponVO();
         rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
-        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",acceptData.getSystem()));
         JSONObject params1 = new JSONObject();
         if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
             params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(), acceptData.getSystem()));
@@ -987,7 +984,7 @@
         // 闄勫姞淇℃伅
         OtherInfo otherInfo = new OtherInfo();
         RewardCouponVO rewardCoupon = new RewardCouponVO();
-        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",acceptData.getSystem()));
         JSONObject params1 = new JSONObject();
         if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
             params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(), acceptData.getSystem()));
@@ -1194,7 +1191,7 @@
         // 闄勫姞淇℃伅
         OtherInfo otherInfo = new OtherInfo();
         RewardCouponVO rewardCoupon = new RewardCouponVO();
-        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",acceptData.getSystem()));
         JSONObject params1 = new JSONObject();
         if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
             params1.put("url", configService.getValue(ConfigKeyEnum.specialGuideRewardCouponLink.getKey(), acceptData.getSystem()));
@@ -1334,7 +1331,7 @@
         // 闄勫姞淇℃伅
         OtherInfo otherInfo = new OtherInfo();
         RewardCouponVO rewardCoupon = new RewardCouponVO();
-        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web",acceptData.getSystem()));
         JSONObject params1 = new JSONObject();
 
         params1.put("url", userVipConfigService.getValueByKey("vip_link"));
@@ -1626,7 +1623,7 @@
             List<GoodsDetailVO> listExtra = new ArrayList<GoodsDetailVO>();
             GoodsMoneyConfigParamsDTO paramsDTO = getParamsDTO(acceptData.getPlatform(), acceptData.getVersion(), null, acceptData.getSystem());
 
-            listExtra = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsList, paramsDTO);
+            listExtra = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsList, paramsDTO,false);
 
             List<GoodsDetailVO> listQuality = new ArrayList<GoodsDetailVO>();
             // 鍙栧伓鏁颁釜鏁版嵁
@@ -1750,6 +1747,11 @@
             return;
         }
 
+        if (userFunctionsLimitService.isLimit(uid, SystemFunction.fanli, new Date())) {
+            out.print(JsonUtil.loadFalseResult(1, "璇ュ姛鑳介檺鍒朵娇鐢�"));
+            return;
+        }
+
         JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(id);
         if (goods == null) {
             out.print(JsonUtil.loadFalseResult(2, "鍟嗗搧宸蹭笅鏋�"));
@@ -1854,6 +1856,11 @@
                     out.print(JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
                     return;
                 }
+
+                if (userFunctionsLimitService.isLimit(uid, SystemFunction.fanli, new Date())) {
+                    out.print(JsonUtil.loadFalseResult(1, "璇ュ姛鑳介檺鍒朵娇鐢�"));
+                    return;
+                }
             }
 
         }
@@ -1922,6 +1929,12 @@
                     out.print(JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
                     return;
                 }
+
+                if (userFunctionsLimitService.isLimit(uid, SystemFunction.fanli, new Date())) {
+                    out.print(JsonUtil.loadFalseResult(1, "璇ュ姛鑳介檺鍒朵娇鐢�"));
+                    return;
+                }
+
                 tag = VipShopUtil.getBuyChanTag(uid);
             }
         }
@@ -1969,6 +1982,11 @@
                     out.print(JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
                     return;
                 }
+
+                if (userFunctionsLimitService.isLimit(uid, SystemFunction.fanli, new Date())) {
+                    out.print(JsonUtil.loadFalseResult(1, "璇ュ姛鑳介檺鍒朵娇鐢�"));
+                    return;
+                }
             }
         }
 

--
Gitblit v1.8.0