From 1da17d215d48e3e3aa9e8d7a3ef526904764f408 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期一, 08 四月 2019 14:06:12 +0800 Subject: [PATCH] 1.5.3部分需求 提交 --- fanli/src/main/java/com/yeshi/fanli/controller/client/InviteGetMoneyController.java | 37 ++++++++++++++++++++++++++++++++++--- 1 files changed, 34 insertions(+), 3 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 f09adde..b4d5841 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 @@ -11,6 +11,7 @@ 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; @@ -176,7 +177,7 @@ * @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")) { @@ -184,9 +185,14 @@ 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); + // 閭�璇疯鍒� 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); @@ -250,7 +256,7 @@ return; } - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("婵�娲绘垚鍔�")); + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�")); } catch (UserInfoExtraException e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); @@ -260,6 +266,31 @@ } } + + /** + * 婵�娲婚個璇� + * + * @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(); + } + } + + /** * 鑾峰彇閭�璇风爜 * -- Gitblit v1.8.0