From 69bee82b81626b82b7f39f0e459e4f56b1699b51 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 13 三月 2019 12:02:16 +0800 Subject: [PATCH] 正式数据库修改 --- fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java index 288e6df..ea282a8 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java @@ -87,7 +87,7 @@ @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 @@ -172,6 +172,23 @@ } 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); @@ -261,6 +278,7 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("婵�娲诲け璐�")); return; } + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("婵�娲绘垚鍔�")); } catch (UserInfoExtraException e) { @@ -356,7 +374,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; } -- Gitblit v1.8.0