admin
2020-02-23 b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
@@ -20,6 +20,7 @@
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.user.UserInfoExtraException;
@@ -35,6 +36,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
@@ -126,7 +128,8 @@
      data.put("activityRules", valueBr);
      data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html",
            Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName()));
      List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
      List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",
            acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
      if (pictureList != null && pictureList.size() > 0) {
         SwiperPicture picture = pictureList.get(0);
         com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject();
@@ -136,7 +139,7 @@
         data.put("topBanner", pictureJson);
      }
      data.put("desc", configService.get("invite_desc"));
      data.put("desc", configService.get(ConfigKeyEnum.inviteDesc.getKey()));
      boolean hasCode = false;
      if (uid != null && uid.trim().length() > 0) {
@@ -148,7 +151,7 @@
      // 邀请激活链接
      if (!hasCode) {
         data.put("activationlink", configService.get("invite_activation_url"));
         data.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
      }
      data.put("hasCode", hasCode);
@@ -181,8 +184,10 @@
      }
      // 邀请链接
//      String shortLink = HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/"
//            + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
      // String shortLink = HttpUtil.getShortLink("http://" +
      // Constant.wxGZConfig.getLoginHost() + "/"
      // + Constant.systemCommonConfig.getProjectName() +
      // "/client/threeShareNew?uid=" + uid);
      data.put("inviteLink", "http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate");
      String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
@@ -201,7 +206,7 @@
      String valueN = values.getValue();
      String valueBr = valueN.replace("\n", "<br><br>");
      data.put("helpLink", configService.get("invite_help_link"));
      data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
      data.put("inviteRules", valueBr);
      out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功"));
@@ -216,7 +221,7 @@
   @RequestMapping(value = "getActivationTip")
   public void getActivationTip(AcceptData acceptData, String callback, PrintWriter out) {
      try {
         String tip = configService.get("invite_activation_tip");
         String tip = configService.get(ConfigKeyEnum.inviteActivationTip.getKey());
         if (tip == null || tip.trim().length() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无提醒"));
            return;
@@ -257,8 +262,14 @@
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("激活失败"));
            return;
         }
         if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
            String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
            JSONObject data = new JSONObject();
            data.put("inviteCode", myInviteCode);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
         JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("邀请码激活成功"));
         } else
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("邀请码激活成功"));
      } catch (UserInfoExtraException e) {
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -284,7 +295,14 @@
      try {
         userInfoExtraService.activationInviteWX(
               Constant.getWXAccount(acceptData.getPlatform(), acceptData.getVersion()), uid, code);
         out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
         if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
            String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
            JSONObject data = new JSONObject();
            data.put("inviteCode", myInviteCode);
            JsonUtil.printMode(out, "", JsonUtil.loadTrueResult(data));
         } else
            out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
      } catch (UserInfoExtraException e) {
         out.print(JsonUtil.loadFalseResult(e.getMsg()));
      } catch (Exception e) {
@@ -315,7 +333,7 @@
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("邀请码不存在"));
            return;
         }
         String tip = configService.get("invite_activation_success_tip");
         String tip = configService.get(ConfigKeyEnum.inviteActivationSuccessTip.getKey());
         JSONObject data = new JSONObject();
         data.put("inviteCode", inviteCode);