From 022c492fe0645af7761889f6471e3e2ae5751fb6 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 26 五月 2020 15:27:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div
---
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java | 58 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
index 589564f..6427764 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -7,6 +7,7 @@
import javax.annotation.Resource;
+import org.json.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -51,6 +52,7 @@
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.VersionUtil;
+import com.yeshi.fanli.vo.homemodule.BannerVO;
import com.yeshi.fanli.vo.user.UserDialogBtnVO;
import com.yeshi.fanli.vo.user.UserDialogVO;
import com.yeshi.fanli.vo.user.VIPUpgradedNotifyVO;
@@ -102,11 +104,10 @@
@Resource
private UserInfoService userInfoService;
-
-
+
@Resource
private UserVIPInfoService userVIPInfoService;
-
+
@Resource
private UserVIPPreInfoService userVIPPreInfoService;
@@ -115,10 +116,9 @@
@Resource
private ThreeSaleSerivce threeSaleSerivce;
-
+
@Resource
private UserVipConfigService userVipConfigService;
-
/**
* s 棣栭〉閰嶇疆淇℃伅
@@ -329,12 +329,18 @@
data.put("taoBaoCart", source);
if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
- // 鎴戠殑鐣岄潰banner
- List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
- acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
- if (banner == null)
- banner = new ArrayList<SwiperPicture>();
- data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
+ // IOS姝e湪涓婄嚎鐗堟湰
+ if ("ios".equalsIgnoreCase(acceptData.getPlatform())
+ && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
+ data.put("banner", new JSONArray());
+ } else {
+ // 鎴戠殑鐣岄潰banner
+ List<BannerVO> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
+ acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
+ if (banner == null)
+ banner = new ArrayList<BannerVO>();
+ data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
+ }
}
if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
@@ -371,23 +377,24 @@
data.put("tearcherLink", tearcherLink);
}
}
-
-
+
if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
- // TODO 楠岃瘉鏄惁鏄甯�
-
+ UserVIPPreInfo info = userVIPPreInfoService.getLatestProcessInfo(uid);
JSONObject inner = new JSONObject();
inner.put("link", userVipConfigService.getValueByKey("vip_link"));
inner.put("ion", "http://img.flqapp.com/resource/vip/icon_vip.png");
inner.put("title", "鍏嶈垂鍗囩骇 浜細鍛樻潈鐩�");
inner.put("btnName", "鍗囩骇浼氬憳");
+
if (uid != null) {
- // 鏄惁瀵煎笀 TODO
- if (userVIPInfoService.isVIP(uid)) {
+ if (info != null && info.getProcess() >= UserVIPPreInfo.PROCESS_3) {
inner.put("link", userVipConfigService.getValueByKey("vip_link"));
inner.put("ion", "http://img.flqapp.com/resource/vip/icon_tearcher.png");
inner.put("title", "鎷夸簲闄╀笌娲ヨ创 浜甯堟潈鐩�");
- inner.put("btnName", "鍗囩骇浼氬憳");
+ if (info.getProcess() == UserVIPPreInfo.PROCESS_4)
+ inner.put("btnName", "鏉挎牀蹇渷");
+ else
+ inner.put("btnName", "鍗囩骇瀵煎笀");
} else {
UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
if (userVIPPreInfo != null) {
@@ -399,13 +406,15 @@
}
}
}
- data.put("vip", inner);
- //骞冲彴瑙勫垯
+ // IOS姝e湪涓婄嚎
+ if ("ios".equalsIgnoreCase(acceptData.getPlatform())
+ && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
+ } else
+ data.put("vip", inner);
+ // 骞冲彴瑙勫垯
String platformRuleLink = configService.get(ConfigKeyEnum.platformRule.getKey());
data.put("platformRule", platformRuleLink);
-
-
- }
+ }
if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()) && uid != null) {
UserLevelUpgradedNotify notify = userLevelUpgradedNotifyService.getNeedNotifyByUid(uid);
@@ -431,9 +440,6 @@
e.printStackTrace();
}
}
-
-
-
// 鑾峰彇鍗囩骇鏃堕棿
private Date getUpgradedTime(Long uid, UserLevelEnum level) {
--
Gitblit v1.8.0