From d844a30a240603daab46e8b2b32b01cd90f1272e Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期四, 23 四月 2020 09:59:31 +0800 Subject: [PATCH] 会员升级调整 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java | 67 +++++++-------------------------- 1 files changed, 14 insertions(+), 53 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java index 21e169b..f1edece 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java @@ -1679,19 +1679,17 @@ 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); @@ -1726,9 +1724,9 @@ 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)); @@ -1754,17 +1752,17 @@ 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); @@ -1819,11 +1817,9 @@ @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) { @@ -1847,9 +1843,9 @@ } 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; @@ -1913,41 +1909,6 @@ out.print(JsonUtil.loadTrueResult("淇濆瓨鎴愬姛")); } - /** - * 鍒犻櫎闃熷憳鍏崇郴 - * - * @param acceptData - * @param uid - * @param inviteId - * 閭�璇穒d - * @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(); - } - } /** * 璁剧疆鐣岄潰寮�鍏崇姸鎬� -- Gitblit v1.8.0