From 744594ef1a2f530fc3e86ea9dc48b62247f79420 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 19 五月 2020 17:13:23 +0800 Subject: [PATCH] 饿了么绘图,添加口碑 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java index 2e14866..777c35a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java @@ -36,8 +36,10 @@ import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.RedisManager; import com.yeshi.fanli.util.StringUtil; +import com.yeshi.fanli.util.VersionUtil; import com.yeshi.fanli.util.account.UserUtil; import com.yeshi.fanli.util.annotation.RequestSerializableByKey; +import com.yeshi.fanli.vo.homemodule.BannerVO; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -103,8 +105,8 @@ data.put("moneyLastMonth", "---"); } else { // 鎴戠殑闃熷憳 - long myFirstTeamCount = threeSaleSerivce.getFirstUsersCount(Long.parseLong(uid)); - long mySecondTeamCount = threeSaleSerivce.getSecondUsersCount(Long.parseLong(uid)); + long myFirstTeamCount = threeSaleSerivce.countFirstTeam(Long.parseLong(uid)); + long mySecondTeamCount = threeSaleSerivce.countSecondTeam(Long.parseLong(uid)); long myTeamCount = myFirstTeamCount + mySecondTeamCount; data.put("myTeam", myTeamCount); // 1.5.0鍚庡凡缁忎笉浣跨敤姝ゅ瓧娈� @@ -127,9 +129,10 @@ data.put("activityRules", valueBr); data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html", Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName())); - List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())); + List<BannerVO> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner", + acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())); if (pictureList != null && pictureList.size() > 0) { - SwiperPicture picture = pictureList.get(0); + BannerVO picture = pictureList.get(0); com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject(); pictureJson.put("src", picture.getSrc()); pictureJson.put("jumpDetail", picture.getJumpDetail()); @@ -182,8 +185,10 @@ } // 閭�璇烽摼鎺� -// String shortLink = HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/" -// + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid); + // String shortLink = HttpUtil.getShortLink("http://" + + // Constant.wxGZConfig.getLoginHost() + "/" + // + Constant.systemCommonConfig.getProjectName() + + // "/client/threeShareNew?uid=" + uid); data.put("inviteLink", "http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate"); String inviteCode = userInfoExtraService.getInviteCodeByUid(uid); @@ -258,8 +263,14 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("婵�娲诲け璐�")); return; } + if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) { + String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid); + JSONObject data = new JSONObject(); + data.put("inviteCode", myInviteCode); + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); - JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�")); + } else + JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�")); } catch (UserInfoExtraException e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); @@ -285,7 +296,14 @@ try { userInfoExtraService.activationInviteWX( Constant.getWXAccount(acceptData.getPlatform(), acceptData.getVersion()), uid, code); - out.print(JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�")); + + if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) { + String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid); + JSONObject data = new JSONObject(); + data.put("inviteCode", myInviteCode); + JsonUtil.printMode(out, "", JsonUtil.loadTrueResult(data)); + } else + out.print(JsonUtil.loadTrueResult("閭�璇风爜婵�娲绘垚鍔�")); } catch (UserInfoExtraException e) { out.print(JsonUtil.loadFalseResult(e.getMsg())); } catch (Exception e) { -- Gitblit v1.8.0