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/client/v2/UserAccountControllerV2.java | 102 ++++++++++++++------------------------------------- 1 files changed, 28 insertions(+), 74 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java index 69e019c..7f253b6 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserAccountControllerV2.java @@ -25,7 +25,6 @@ import com.google.gson.JsonSerializer; import com.yeshi.fanli.dto.user.UserInviteLevelEnum; import com.yeshi.fanli.entity.accept.AcceptData; -import com.yeshi.fanli.entity.bus.user.HongBaoV2; import com.yeshi.fanli.entity.bus.user.SMSHistory; import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserInfo; @@ -584,35 +583,13 @@ UserInviteLevelEnum level = userInviteService.getUserInviteLevelNew(uid); // 杈句汉 - long limitZiGou = 0; - long limitShare = 0; + long limitOrder = 0; long limitFirst = 0; long limitSecond = 0; if (level == UserInviteLevelEnum.actived || level == UserInviteLevelEnum.noActive) { - String zigou = userVipConfigService.getValueByKey("vip_pre_3_zigou_order_count"); - if (!StringUtil.isNullOrEmpty(zigou)) { - limitZiGou = Long.parseLong(zigou); - } - String share = userVipConfigService.getValueByKey("vip_pre_3_share_order_count"); - if (!StringUtil.isNullOrEmpty(share)) { - limitShare = Long.parseLong(share); - } - String first = userVipConfigService.getValueByKey("vip_pre_3_first_level_team_count"); - if (!StringUtil.isNullOrEmpty(first)) { - limitFirst = Long.parseLong(first); - } - String second = userVipConfigService.getValueByKey("vip_pre_3_second_level_team_count"); - if (!StringUtil.isNullOrEmpty(second)) { - limitSecond = Long.parseLong(second); - } - } else if (level == UserInviteLevelEnum.normalVIP) { - String zigou = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count"); - if (!StringUtil.isNullOrEmpty(zigou)) { - limitZiGou = Long.parseLong(zigou); - } - String share = userVipConfigService.getValueByKey("vip_pre_7_share_order_count"); - if (!StringUtil.isNullOrEmpty(share)) { - limitShare = Long.parseLong(share); + String orderCount = userVipConfigService.getValueByKey("vip_pre_7_order_count"); + if (!StringUtil.isNullOrEmpty(orderCount)) { + limitOrder = Long.parseLong(orderCount); } String first = userVipConfigService.getValueByKey("vip_pre_7_first_level_team_count"); if (!StringUtil.isNullOrEmpty(first)) { @@ -623,13 +600,9 @@ limitSecond = Long.parseLong(second); } } else if (level == UserInviteLevelEnum.highVIP || level == UserInviteLevelEnum.vipApply) { - String zigou = userVipConfigService.getValueByKey("vip_pre_10_zigou_order_count"); - if (!StringUtil.isNullOrEmpty(zigou)) { - limitZiGou = Long.parseLong(zigou); - } - String share = userVipConfigService.getValueByKey("vip_pre_10_share_order_count"); - if (!StringUtil.isNullOrEmpty(share)) { - limitShare = Long.parseLong(share); + String orderCount = userVipConfigService.getValueByKey("vip_pre_10_order_count"); + if (!StringUtil.isNullOrEmpty(orderCount)) { + limitOrder = Long.parseLong(orderCount); } String first = userVipConfigService.getValueByKey("vip_pre_10_first_level_team_count"); if (!StringUtil.isNullOrEmpty(first)) { @@ -647,16 +620,7 @@ } // 鑷喘璁㈠崟 - long doneZiGou = hongBaoV2CountService.counOrderByUidAndOrderType(uid, Constant.VIP_ORDER_PAY, - HongBaoV2.TYPE_ZIGOU); - // 鍒嗕韩璁㈠崟 - long doneShare = hongBaoV2CountService.counOrderByUidAndOrderType(uid, Constant.VIP_ORDER_PAY, - HongBaoV2.TYPE_SHARE_GOODS); - - - Date now = new Date(); - Date start = new Date(0); - + long doneOrder = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY); // 鏈夋晥绮変笣 int doneFirst = 0; int doneSecond = 0; @@ -666,6 +630,8 @@ doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond(); } + Date now = new Date(); + Date start = new Date(0); // 鐪侀挶锛� ---杩斿埄璁㈠崟銆佸鍔卞埜鎻愭垚 List<UserMoneyDetailTypeEnum> typeFanli = new ArrayList<>(); typeFanli.add(UserMoneyDetailTypeEnum.fanli); @@ -687,33 +653,24 @@ } String shareRate = "鍙韩浣i噾鐨�<label style=\"color:#E5005C;\">%s</label>"; - String fansRate = "鏈�楂樹剑閲戠殑<label style=\"color:#E5005C;\">%s</label>"; - String fansIndirect = "鏈�楂樹剑閲戠殑<label style=\"color:#E5005C;\">%s</label>"; - String teamBonus = "鍥㈤槦鍒嗙孩姹�<label style=\"color:#E5005C;\">%s</label>"; + String teamRate = "鏈�楂樹剑閲戠殑<label style=\"color:#E5005C;\">%s</label>"; // 杈句汉鐗� JSONObject jsonrRed1 = new JSONObject(); - jsonrRed1.put("shareRate", String.format(shareRate, "152%")); - jsonrRed1.put("fansRate", String.format(fansRate, "22.5%")); - jsonrRed1.put("fansIndirect", String.format(fansIndirect, "5%")); - jsonrRed1.put("teamBonus", "楂樼骇浼氬憳浠ヤ笂涓撳睘"); + jsonrRed1.put("enjoyRate", String.format(shareRate, "145%")); + jsonrRed1.put("teamRate", String.format(teamRate, "25%")); + jsonrRed1.put("teamIncome", "楂樼骇浼氬憳浠ヤ笂涓撳睘"); + // 楂樼骇浼氬憳 JSONObject jsonrRed2 = new JSONObject(); - jsonrRed2.put("shareRate", String.format(shareRate, "162.5%")); - jsonrRed2.put("fansRate", String.format(fansRate, "27.5%")); - jsonrRed2.put("fansIndirect", String.format(fansIndirect, "7.5%")); - jsonrRed2.put("teamBonus", "楂樼骇浼氬憳浠ヤ笂涓撳睘"); - + jsonrRed2.put("enjoyRate", String.format(shareRate, "195%")); + jsonrRed2.put("teamRate", String.format(teamRate, "50%")); + jsonrRed2.put("teamIncome", "浜珮绾у洟闃熸敹鐩�"); + + // 瓒呯骇浼氬憳 JSONObject jsonrRed3 = new JSONObject(); - jsonrRed3.put("shareRate", String.format(shareRate, "170%")); - jsonrRed3.put("fansRate", String.format(fansRate, "32.5%")); - jsonrRed3.put("fansIndirect", String.format(fansIndirect, "10%")); - jsonrRed3.put("teamBonus", String.format(teamBonus, "40%")); - - JSONObject jsonrRed4 = new JSONObject(); - jsonrRed4.put("shareRate", String.format(shareRate, "225%")); - jsonrRed4.put("fansRate", String.format(fansRate, "37.5%")); - jsonrRed4.put("fansIndirect", String.format(fansIndirect, "12.5%")); - jsonrRed4.put("teamBonus", String.format(teamBonus, "80%")); + jsonrRed3.put("enjoyRate", String.format(shareRate, "210%")); + jsonrRed3.put("teamRate", String.format(teamRate, "110%")); + jsonrRed3.put("teamIncome", "浜秴绾у洟闃熸敹鐩�"); JSONObject json = new JSONObject(); @@ -729,22 +686,19 @@ json.put("newerGongLue", configService.get(ConfigKeyEnum.newerGonglue.getKey())); // 宸插畬鎴� - json.put("doneZiGou", doneZiGou); - json.put("doneShare", doneShare); + json.put("doneOrder", doneOrder); json.put("doneFirst", doneFirst); json.put("doneSecond", doneSecond); // 鏍囧噯 - json.put("limitZiGou", limitZiGou); - json.put("limitShare", limitShare); + json.put("limitOrder", limitOrder); json.put("limitFirst", limitFirst); json.put("limitSecond", limitSecond); // 宸插畬鎴� - json.put("master", jsonrRed1); - json.put("vip1", jsonrRed2); - json.put("vip2", jsonrRed3); - json.put("vip3", jsonrRed4); + json.put("daRen", jsonrRed1); + json.put("highVIP", jsonrRed2); + json.put("superVIP", jsonrRed3); // 浜哄伐瀹㈡湇閾炬帴 json.put("csdLink", configService.get(ConfigKeyEnum.customerServiceLink.getKey())); -- Gitblit v1.8.0