yujian
2020-04-27 d5c2554ebae75afbff31c3c2966cc3a747ba941c
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -102,11 +102,10 @@
   @Resource
   private UserInfoService userInfoService;
   @Resource
   private UserVIPInfoService userVIPInfoService;
   @Resource
   private UserVIPPreInfoService userVIPPreInfoService;
@@ -115,10 +114,9 @@
   @Resource
   private ThreeSaleSerivce threeSaleSerivce;
   @Resource
   private UserVipConfigService userVipConfigService;
   /**
    * s 首页配置信息
@@ -371,23 +369,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) {
@@ -400,7 +399,10 @@
               }
            }
            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);
@@ -426,9 +428,6 @@
         e.printStackTrace();
      }
   }
   // 获取升级时间
   private Date getUpgradedTime(Long uid, UserLevelEnum level) {
@@ -438,7 +437,7 @@
         if (vipInfo != null && vipInfo.getState() == UserVIPInfo.STATE_SUCCESS)
            time = vipInfo.getSuccessTime();
      } else if (level == UserLevelEnum.highVIP || level == UserLevelEnum.normalVIP) {
      } else if (level == UserLevelEnum.highVIP) {
         UserVIPPreInfo info = userVIPPreInfoService.selectByUidAndProcess(uid, level.getLevel());
         if (info != null)
            time = info.getCreateTime();