| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param inviteId
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "tailorCode")
|
| | |
| | | * 用户队员统计 1.4.1
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countMyTeam", method = RequestMethod.POST)
|
| | |
| | |
|
| | | JSONObject resultData = new JSONObject();
|
| | |
|
| | | String helpLink = configService.get(ConfigKeyEnum.teamHelpUrl.getKey());
|
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem());
|
| | | if (helpLink == null) {
|
| | | helpLink = "";
|
| | | }
|
| | |
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | | // 邀请激活链接
|
| | | resultData.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem()));
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | |
|
| | |
| | | /**
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "listMyTeam")
|
| | |
| | | out.print(JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | JSONObject bossData = getBossInfo(uid, threeSaleSerivce.getMyBoss(uid));
|
| | | JSONObject bossData = getBossInfo(uid, threeSaleSerivce.getMyBoss(uid),acceptData.getSystem());
|
| | | out.print(JsonUtil.loadTrueResult(bossData));
|
| | | }
|
| | |
|
| | |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param inviteId
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "remindBossAddWX")
|
| | |
| | | /**
|
| | | * 上级信息组织
|
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param threeSale
|
| | | * @return
|
| | | */
|
| | | private JSONObject getBossInfo(long uid, ThreeSale threeSale) {
|
| | | private JSONObject getBossInfo(long uid, ThreeSale threeSale, SystemEnum system) {
|
| | | JSONObject bossData = new JSONObject();
|
| | | if (threeSale != null && threeSale.getBoss() != null) {
|
| | | UserInfo boss = threeSale.getBoss();
|
| | |
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | } else {
|
| | | bossData.put("hasBoss", false);
|
| | | bossData.put("helpLink", configService.get(ConfigKeyEnum.inviteCodeHlepLink.getKey()));
|
| | | bossData.put("helpLink", configService.getValue(ConfigKeyEnum.inviteCodeHlepLink.getKey(),system));
|
| | | bossData.put("weiXinTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。");
|
| | | }
|
| | | return bossData;
|