From e7920b14a9baab97035a1a529da85d124a2bcacd Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 16 六月 2020 10:54:29 +0800 Subject: [PATCH] 云发单对测试用户显示 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 39 insertions(+), 12 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 ed79d4c..89ae2f5 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; @@ -16,7 +17,6 @@ import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.homemodule.FloatAD; import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum; -import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture; import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState; import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserActiveLog; @@ -51,6 +51,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; @@ -327,12 +328,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,9 +378,7 @@ } 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"); @@ -381,11 +386,14 @@ inner.put("btnName", "鍗囩骇浼氬憳"); if (uid != null) { - if (info!=null&&info.getProcess()==UserVIPPreInfo.PROCESS_3) { + 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) { @@ -397,7 +405,11 @@ } } } - 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); @@ -421,6 +433,21 @@ } } } + + // 浜戝彂鍗曢摼鎺� + if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) { + boolean cloudOpen = configService.isRobotCloudOpen(); + if (!cloudOpen && uid != null) { + List<String> testUsers = configService.getTestUsers(); + if (testUsers != null && testUsers.contains(uid+"")) { + cloudOpen = true; + } + } + + if (cloudOpen) { + data.put("cloudLink", configService.get(ConfigKeyEnum.robotCloudLink.getKey())); + } + } out.print(JsonUtil.loadTrueResult(data)); } catch (Exception e) { out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触")); -- Gitblit v1.8.0