| | |
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.money.InviteGetMoney;
|
| | |
| | | * @throws IOException
|
| | | */
|
| | | @RequestMapping(value = "/listInviteFriendImg", method = RequestMethod.POST)
|
| | | public void listInviteFriendImg(AcceptData acceptData, PrintWriter out, Long uid)
|
| | | public void listInviteFriendImg(AcceptData acceptData, Long uid, PrintWriter out)
|
| | | throws NotExistObjectException, IOException {
|
| | | JSONObject data = new JSONObject();
|
| | | if (uid != null && !uid.equals("0")) {
|
| | |
| | | data.put("imgUrlList", JsonUtil.getSimpleGsonWithDate().toJson(imgList));
|
| | | }
|
| | |
|
| | | // 邀请链接
|
| | | String shortLink = HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/" |
| | | + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
|
| | | data.put("inviteLink", shortLink);
|
| | | |
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null) {
|
| | | data.put("inviteCode", userInfoExtra.getInviteCode());
|
| | | }
|
| | | |
| | | // 邀请规则
|
| | | String key = "inviteRules"; // key值
|
| | | com.yeshi.fanli.entity.system.BusinessSystem system = new BusinessSystem();
|
| | | BusinessSystem system = new BusinessSystem();
|
| | | system.setCreatetime(java.lang.System.currentTimeMillis());
|
| | | system.setPlatform(1);
|
| | | system.setId(4L);
|
| | |
| | | String valueN = values.getValue();
|
| | | String valueBr = valueN.replace("\n", "<br><br>");
|
| | |
|
| | | data.put("helpLink", configService.get("invite_help_link"));
|
| | | |
| | | data.put("inviteRules", valueBr);
|
| | | out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功"));
|
| | | }
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("激活成功"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("邀请码激活成功"));
|
| | |
|
| | | } catch (UserInfoExtraException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 激活邀请
|
| | | * |
| | | * @param callback
|
| | | * @param uid
|
| | | * 用户id
|
| | | * @param inviteCode
|
| | | * 邀请嘛
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "activationInviteWX")
|
| | | public void activationInviteWX(AcceptData acceptData, Long uid, String code, PrintWriter out) {
|
| | | try {
|
| | | userInfoExtraService.activationInviteWX(uid, code);
|
| | | out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("邀请码激活失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取邀请码
|
| | | *
|