| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取等级信息
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getUserConfig", method = RequestMethod.POST)
|
| | | public void getUserConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | try {
|
| | | |
| | | String inviteCode = userInfoExtraService.getUserInviteCode(uid);
|
| | | |
| | | JSONObject inviteData = new JSONObject();
|
| | | if (inviteCode == null || inviteCode.trim().length() == 0) {
|
| | | // 无邀请码
|
| | | inviteData.put("content", "邀请激活");
|
| | | inviteData.put("link", configService.get("invite_activation_url"));
|
| | | } else {
|
| | | // 已有邀请码
|
| | | inviteData.put("content", "邀请码");
|
| | | inviteData.put("link", configService.get("invite_activation_success_url"));
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("invite", inviteData);
|
| | | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|