| | |
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | |
| | | 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;
|
| | |
| | | @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
|
| | |
| | |
|
| | | // 活动规则
|
| | | String key = "activityRules"; // key值
|
| | | com.yeshi.fanli.entity.system.System system = new System();
|
| | | BusinessSystem system = new BusinessSystem();
|
| | | system.setCreatetime(java.lang.System.currentTimeMillis());
|
| | | system.setPlatform(1);
|
| | | system.setId(4L);
|
| | |
| | | }
|
| | |
|
| | | 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; // 已有邀请码
|
| | | }
|
| | | }
|
| | | |
| | | // 邀请激活链接
|
| | | if (!hasCode) {
|
| | | data.put("activationlink", configService.get("invite_activation_url"));
|
| | | }
|
| | | |
| | | data.put("hasCode", hasCode);
|
| | |
|
| | | |
| | |
|
| | | com.alibaba.fastjson.JSONObject root = new com.alibaba.fastjson.JSONObject();
|
| | | root.put("code", 0);
|
| | |
| | |
|
| | | // 邀请规则
|
| | | String key = "inviteRules"; // key值
|
| | | com.yeshi.fanli.entity.system.System system = new System();
|
| | | com.yeshi.fanli.entity.system.BusinessSystem system = new BusinessSystem();
|
| | | system.setCreatetime(java.lang.System.currentTimeMillis());
|
| | | system.setPlatform(1);
|
| | | system.setId(4L);
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("激活失败"));
|
| | | return;
|
| | | }
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("激活成功"));
|
| | |
|
| | | } catch (UserInfoExtraException e) {
|
| | |
| | | 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);
|
| | |
| | | }
|
| | |
|
| | | 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;
|
| | | }
|