From f32cc15f60bf3b5c47267ee256a0deb3bdd01eec Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 23 四月 2020 14:09:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/InviteController.java | 56 +++++++++----------------------------------------------- 1 files changed, 9 insertions(+), 47 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/InviteController.java b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/InviteController.java index 1ab8e0a..1ff6e9f 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/InviteController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/InviteController.java @@ -12,7 +12,6 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.yeshi.utils.DateUtil; import org.yeshi.utils.JsonUtil; import com.yeshi.fanli.dto.WXMPAcceptData; @@ -22,14 +21,12 @@ import com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.bus.user.UserInfoExtra; -import com.yeshi.fanli.entity.bus.user.UserInviteSeparate; import com.yeshi.fanli.entity.system.ConfigKeyEnum; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.msg.UserSystemMsgService; import com.yeshi.fanli.service.inter.push.PushService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserInfoService; -import com.yeshi.fanli.service.inter.user.UserInviteSeparateService; import com.yeshi.fanli.service.inter.user.invite.ThreeSaleExtraInfoSerivce; import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce; import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService; @@ -54,9 +51,6 @@ @Resource private UserVIPInfoService userVIPInfoService; - - @Resource - private UserInviteSeparateService userInviteSeparateService; @Resource private ThreeSaleExtraInfoSerivce threeSaleExtraInfoSerivce; @@ -108,7 +102,7 @@ JSONObject data = new JSONObject(); data.put("desc", array); - data.put("num", threeSaleSerivce.countFirstTeam(uid, 1)); + data.put("num", threeSaleSerivce.countFirstTeam(uid)); data.put("limit", Constant.INVITE_CODRE_TAILOR_LIMIT); out.print(JsonUtil.loadTrueResult(data)); @@ -124,11 +118,8 @@ @RequestMapping(value = "countMyTeam", method = RequestMethod.POST) public void countMyTeam(WXMPAcceptData acceptData, long uid, PrintWriter out) { try { - long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1); - long firstTeamTotal = threeSaleSerivce.countFirstTeam(uid, null); - - long secondTeam = threeSaleSerivce.countSecondTeam(uid, 1); - long secondTeamTotal = threeSaleSerivce.countSecondTeam(uid, null); + long firstTeam = threeSaleSerivce.countFirstTeam(uid); + long secondTeam = threeSaleSerivce.countSecondTeam(uid); JSONObject bossData = new JSONObject(); ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid); if (threeSale != null) { @@ -152,9 +143,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; @@ -191,11 +182,11 @@ long count = 0; List<ThreeSale> listTeam = null; if (type == 1) { - listTeam = threeSaleSerivce.listFirstTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid, 1); - count = threeSaleSerivce.countFirstTeam(uid, 1); + listTeam = threeSaleSerivce.listFirstTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid); + count = threeSaleSerivce.countFirstTeam(uid); } else if (type == 2) { - listTeam = threeSaleSerivce.listSecondTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid, 1); - count = threeSaleSerivce.countSecondTeam(uid, 1); + listTeam = threeSaleSerivce.listSecondTeam((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, uid); + count = threeSaleSerivce.countSecondTeam(uid); } boolean needVIPInfo = true; @@ -261,35 +252,6 @@ // 娣诲姞鏄惁涓篤IP if (vipMap != null && vipMap.get(worker.getId()) != null) { object.put("vip", vipMap.get(worker.getId())); - if (vipMap.get(worker.getId())) { - UserInviteSeparate separate = userInviteSeparateService.selectByWorkerIdAndBossId(worker.getId(), - uid); - if (separate != null && separate.getEndTime() != null) { - try { - - JSONObject contentJson1 = new JSONObject(); - contentJson1.put("color", "#888888"); - contentJson1.put("content", "灏嗕簬"); - - JSONObject contentJson2 = new JSONObject(); - contentJson2.put("color", "#F14242"); - contentJson2.put("content", DateUtil.dateDiff4(new Date(), separate.getEndTime())); - - JSONObject contentJson3 = new JSONObject(); - contentJson3.put("color", "#888888"); - contentJson3.put("content", "鍚庤劚绂婚個璇峰叧绯�"); - - JSONArray array = new JSONArray(); - array.add(contentJson1); - array.add(contentJson2); - array.add(contentJson3); - object.put("vipBreakTime", array); - - } catch (Exception e) { - e.printStackTrace(); - } - } - } } String fontColor1 = "#888888"; JSONArray array = new JSONArray(); -- Gitblit v1.8.0