| | |
| | |
|
| | | JSONObject resultData = new JSONObject();
|
| | | if (type == 1) {
|
| | | resultData = threeSaleSerivce.getMyFirstTeam((page - 1) * pageSize, pageSize, uid, null);
|
| | | resultData = threeSaleSerivce.getMyFirstTeam((page - 1) * pageSize, pageSize, uid);
|
| | | } else if (type == 2) {
|
| | | resultData = threeSaleSerivce.getMySecondTeam((page - 1) * pageSize, pageSize, uid, null);
|
| | | resultData = threeSaleSerivce.getMySecondTeam((page - 1) * pageSize, pageSize, uid);
|
| | | }
|
| | |
|
| | | // 安卓系统返回所有数据
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
|
| | | long firstTeamTotal = threeSaleSerivce.countFirstTeam(uid, null);
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid);
|
| | |
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid, 1);
|
| | | long secondTeamTotal = threeSaleSerivce.countSecondTeam(uid, null);
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid);
|
| | |
|
| | | JSONObject bossData = null;
|
| | | ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
|
| | |
| | |
|
| | | resultData.put("helpLink", helpLink);
|
| | | resultData.put("firstTeam", firstTeam);
|
| | | resultData.put("firstTeamTotal", firstTeamTotal);
|
| | | resultData.put("firstTeamTotal", firstTeam);
|
| | | resultData.put("secondTeam", secondTeam);
|
| | | resultData.put("secondTeamTotal", secondTeamTotal);
|
| | | resultData.put("secondTeamTotal", secondTeam);
|
| | | resultData.put("boss", bossData);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(resultData));
|
| | |
| | |
|
| | | JSONObject resultData = new JSONObject();
|
| | | if (type == 1) {
|
| | | resultData = threeSaleSerivce.getMyFirstTeam((page - 1) * pageSize, pageSize, uid, 1);
|
| | | resultData = threeSaleSerivce.getMyFirstTeam((page - 1) * pageSize, pageSize, uid);
|
| | | } else if (type == 2) {
|
| | | resultData = threeSaleSerivce.getMySecondTeam((page - 1) * pageSize, pageSize, uid, 1);
|
| | | resultData = threeSaleSerivce.getMySecondTeam((page - 1) * pageSize, pageSize, uid);
|
| | | }
|
| | |
|
| | | // 安卓系统返回所有数据
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid);
|
| | |
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid, 1);
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid);
|
| | |
|
| | | JSONObject bossData = null;
|
| | | ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
|
| | |
| | | @RequestMapping(value = "countMyTeam", method = RequestMethod.POST)
|
| | | public void countMyTeam(AcceptData acceptData, long uid, PrintWriter out) {
|
| | | try {
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
|
| | | long firstTeamTotal = threeSaleSerivce.countFirstTeam(uid, null);
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid);
|
| | |
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid, 1);
|
| | | long secondTeamTotal = threeSaleSerivce.countSecondTeam(uid, null);
|
| | | long secondTeam = threeSaleSerivce.countSecondTeam(uid);
|
| | | JSONObject bossData = new JSONObject();
|
| | | ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
|
| | | if (threeSale != null) {
|
| | |
| | | }
|
| | | resultData.put("helpLink", helpLink);
|
| | | resultData.put("firstTeam", firstTeam);
|
| | | resultData.put("firstTeamTotal", firstTeamTotal);
|
| | | resultData.put("firstTeamTotal", firstTeam);
|
| | | resultData.put("secondTeam", secondTeam);
|
| | | resultData.put("secondTeamTotal", secondTeamTotal);
|
| | | resultData.put("secondTeamTotal", secondTeam);
|
| | | resultData.put("boss", bossData);
|
| | |
|
| | | boolean hasCode = false;
|
| | |
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除队员关系
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param inviteId
|
| | | * 邀请id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "removethreesale", method = RequestMethod.POST)
|
| | | public void removethreesale(AcceptData acceptData, long uid, long inviteId, PrintWriter out) {
|
| | | try {
|
| | | List<ThreeSale> listThreeSale = threeSaleSerivce.listbyIdAndBossId(inviteId, uid, 1);
|
| | | if (listThreeSale == null || listThreeSale.size() == 0) {
|
| | | out.print(JsonUtil.loadFalseResult("操作数据无效"));
|
| | | return;
|
| | | }
|
| | |
|
| | | UserInfo worker = listThreeSale.get(0).getWorker();
|
| | | if (worker == null) {
|
| | | out.print(JsonUtil.loadFalseResult("操作数据无效"));
|
| | | return;
|
| | | }
|
| | |
|
| | | // 删除关系
|
| | | threeSaleSerivce.deleteByPrimaryKey(inviteId);
|
| | | // 删除备注
|
| | | threeSaleExtraInfoSerivce.deleteByBossIdAndWorkerId(uid, worker.getId());
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult("删除成功"));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("删除失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 设置界面开关状态
|
| | |
| | | if (mySettings.getNoInvitationBonus() == null) {
|
| | | mySettings.setNoInvitationBonus(0);
|
| | | }
|
| | | |
| | | if (mySettings.getNoDisplayPhoneNum() == null) {
|
| | | mySettings.setNoDisplayPhoneNum(0);
|
| | | }
|
| | |
|
| | | if (mySettings.getOpenSpreadHongBao() == null) {
|
| | | if (userTaoLiJinDetailService.countDetail(uid) > 0) {
|
| | |
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | UserInviteLevelEnum level = null;
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | level = userInviteService.getUserInviteLevelNew(uid);
|
| | | } else {
|
| | | level = userInviteService.getUserInviteLevel(uid);
|
| | | }
|
| | | JSONObject inviteLevel = new JSONObject();
|
| | | UserInviteLevelEnum level = userInviteService.getUserInviteLevel(uid);
|
| | | inviteLevel.put("level", level.name());
|
| | | inviteLevel.put("link", level.getLink());
|
| | | data.put("inviteLevel", inviteLevel);
|
| | | }
|
| | | |
| | | if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | data.put("fansCountLink", configService.get(ConfigKeyEnum.teamStatisticsLink.getKey()));
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|