hexiaohui
2019-01-27 e4a74cbbb4f34b9e88dfa6edb8296a7e5b9e127c
fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java
@@ -36,6 +36,7 @@
import com.yeshi.fanli.service.inter.user.UserRankingsService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.account.UserUtil;
import net.sf.json.JSONArray;
@@ -80,10 +81,13 @@
   @Resource
   private ThreeSaleSerivce threeSaleSerivce;
   @Resource
   private RedisManager redisManager;
   @RequestMapping(value = "/inviteGetMoney", method = RequestMethod.POST)
   public void everyDayTaskList(AcceptData acceptData, int pageIndex, PrintWriter out, String uid)
         throws NotExistObjectException {
         throws NotExistObjectException,UserInfoExtraException {
      // 查询商品总数
      Integer totalCount = 0;
      int totalPage = totalCount % Constant.PAGE_SIZE == 0 ? totalCount / Constant.PAGE_SIZE
@@ -168,6 +172,17 @@
      }
      data.put("desc", configService.get("invite_desc"));
      boolean hasCode = false;
      if (uid != null && uid.trim().length() > 0) {
         String inviteCode = userInfoExtraService.getUserInviteCode(Long.parseLong(uid));
         if (inviteCode != null && inviteCode.trim().length() > 0) {
            hasCode = true;   // 已有邀请码
         }
      }
      data.put("hasCode", hasCode);
      com.alibaba.fastjson.JSONObject root = new com.alibaba.fastjson.JSONObject();
      root.put("code", 0);
@@ -317,7 +332,15 @@
            return;
         }
         
         String inviteShortLink = redisManager.getInviteShortLink(uid);
         if (inviteShortLink != null && inviteShortLink.trim().length() > 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请1分钟后再试"));
            return;
         }
         String shortLink = UserUtil.getInviteShortLink(uid);
         // 缓存1分钟
         redisManager.setInviteShortLink(uid, shortLink);
         
         JSONObject data = new JSONObject();
         data.put("shortLink", shortLink);
@@ -344,7 +367,7 @@
         }
         
         UserInfo userInfo = userInfoService.selectByPKey(uid);
         if (userInfo == null || userInfo.getPhone() == null) {
         if (userInfo == null || userInfo.getPhone() == null || userInfo.getPhone().trim().length() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂未绑定电话号码"));
            return;
         }