| | |
| | |
|
| | | // 组织数据
|
| | | JSONObject resultData = organizeTeam(count, listTeam, uid, type);
|
| | | resultData.put("helpLink", configService.get("team_help_url"));
|
| | |
|
| | | boolean hasCode = false;
|
| | | boolean bdWeiXin = false;
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null) {
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
|
| | | hasCode = true;
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
|
| | | bdWeiXin = true;
|
| | | }
|
| | | |
| | | // 未激活邀请码
|
| | | if (!hasCode) {
|
| | | resultData.put("helpLinkActivate", configService.get("team_help_url"));
|
| | | resultData.put("tipCode", "激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。\r\n邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | | |
| | | // 未添加微信号
|
| | | if (!bdWeiXin) {
|
| | | resultData.put("tipWeiXin", "添加微信号后,你的邀请人和一级队员可通过微信号与你建立联系;\r\n你也可以向邀请人学习或向一级队员教授赚钱技巧。");
|
| | | }
|
| | | resultData.put("bdWeiXin", bdWeiXin);
|
| | | |
| | | |
| | | // 安卓返回统计数据
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | JSONObject bossData = getBossInfo(acceptData, uid, threeSaleSerivce.getMyBoss(uid));
|
| | | resultData.put("boss", bossData);
|
| | | resultData.put("firstTeam", threeSaleSerivce.countFirstTeam(uid, 1));
|
| | | resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | | }
|
| | |
|
| | |
| | | resultData.put("firstTeamTotal", threeSaleSerivce.countFirstTeam(uid, null));
|
| | | resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
|
| | | resultData.put("secondTeamTotal", threeSaleSerivce.countSecondTeam(uid, null));
|
| | | |
| | | boolean hasCode = false;
|
| | | boolean bdWeiXin = false;
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null) {
|
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode()))
|
| | | hasCode = true;
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin()))
|
| | | bdWeiXin = true;
|
| | | }
|
| | | |
| | | List<String> tipCode = new ArrayList<String>();
|
| | | // 未激活邀请码
|
| | | if (!hasCode) {
|
| | | resultData.put("helpLinkActivate", configService.get("team_help_url"));
|
| | | tipCode.add("激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。");
|
| | | tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | | resultData.put("tipCode", tipCode);
|
| | | |
| | | // 未添加微信号
|
| | | List<String> tipWeiXin = new ArrayList<String>();
|
| | | if (!bdWeiXin) {
|
| | | tipWeiXin.add("添加微信号后,你的邀请人和一级队员可通过微信号与你建立联系;");
|
| | | tipWeiXin.add("你也可以向邀请人学习或向一级队员教授赚钱技巧。");
|
| | | }
|
| | | resultData.put("tipWeiXin", tipWeiXin);
|
| | | resultData.put("bdWeiXin", bdWeiXin);
|
| | | |
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | | }
|
| | |
|
| | |
| | | Long createTime = threeSale.getCreateTime();
|
| | | Date inviteTime = new Date(createTime);
|
| | |
|
| | | |
| | | if(VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(boss.getId());
|
| | | if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin())) {
|
| | | bossData.put("weiXin", userInfoExtra.getWeiXin());
|
| | | bossData.put("weiXinState", 3);
|
| | | bossData.put("weiXinTip", "添加TA的微信,你可向TA学习如何通过板栗快省赚钱。");
|
| | | } else {
|
| | | if (!threeSaleExtraInfoSerivce.isRemindBoss(boss.getId(), uid)) {
|
| | | bossData.put("weiXinState", 1);
|
| | | bossData.put("weiXinTip", "点击提醒TA,系统会发送一封站内信,提醒其添加微信号。");
|
| | | } else {
|
| | | bossData.put("weiXinState", 2);
|
| | | bossData.put("weiXinTip", "系统已发送提醒,邀请人添加微信后你可复制,如对方迟迟不添加,你可联系人工客服寻求帮助");
|
| | | }
|
| | | }
|
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(boss.getId());
|
| | | if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin())) {
|
| | | bossData.put("weiXin", userInfoExtra.getWeiXin());
|
| | | bossData.put("weiXinState", 3);
|
| | | bossData.put("weiXinTip", "添加TA的微信,你可向TA学习如何通过板栗快省赚钱。");
|
| | | } else {
|
| | | bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime));
|
| | | if (!threeSaleExtraInfoSerivce.isRemindBoss(boss.getId(), uid)) {
|
| | | bossData.put("weiXinState", 1);
|
| | | bossData.put("weiXinTip", "点击提醒TA,系统会发送一封站内信,提醒其添加微信号。");
|
| | | } else {
|
| | | bossData.put("weiXinState", 2);
|
| | | bossData.put("weiXinTip", "系统已发送提醒,邀请人添加微信后你可复制,如对方迟迟不添加,你可联系人工客服寻求帮助");
|
| | | }
|
| | | }
|
| | | } else if(VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())){
|
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | |
| | | } else {
|
| | | bossData.put("hasBoss", false);
|
| | | bossData.put("helpLink", configService.get("invite_code_hlep_link"));
|
| | | bossData.put("bossTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。"); |
| | | bossData.put("weiXinTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。"); |
| | | }
|
| | | return bossData;
|
| | | }
|