From ee1d39f11b9483b64a88029f1755a6e7166fea15 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期日, 26 四月 2020 16:49:21 +0800
Subject: [PATCH] 等级显示问题
---
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java | 68 +++++++++++++++++-----------------
1 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
index 2fee3b4..65d8414 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -33,6 +33,8 @@
import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail.TaoLiJinDetailTypeEnum;
import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinNewbies;
import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
+import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.entity.taobao.ShareHotGoods;
import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
import com.yeshi.fanli.entity.taobao.TLJFreeBuyGoods;
@@ -147,13 +149,12 @@
@Resource
private SwiperPictureService swiperPictureService;
-
+
@Resource
private UserTaoLiJinNewbiesService userTaoLiJinNewbiesService;
-
+
@Resource
private TLJFreeBuyGoodsService tljFreeBuyGoodsService;
-
/**
* 鑾峰彇娣樼ぜ閲戝垎浜褰�
@@ -379,8 +380,6 @@
out.print(JsonUtil.loadTrueResult(data));
}
-
-
/**
* 鍒嗕韩鐖嗘鍟嗗搧-闄愪簬娣樼ぜ閲�
*
@@ -488,9 +487,8 @@
}
}
- BigDecimal fanLiRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
- BigDecimal shareRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
- ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
+ ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+ acceptData.getVersion());
for (ShareHotGoods hotGoods : listHot) {
TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
@@ -508,7 +506,7 @@
}
GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
-
+
// 澶т簬1.6.5鐨勬墠浼氭樉绀虹鍒╀环
if (com.yeshi.fanli.util.VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
if (detailVO.getCouponPrice() != null && detailVO.getCouponPrice().compareTo(new BigDecimal(0)) > 0)
@@ -516,7 +514,7 @@
else
detailVO.setZkPrice(detailVO.getZkPrice().subtract(spreadMoney));
}
-
+
// 鍘绘帀鏍囩
detailVO.setLabels(null);
@@ -616,14 +614,15 @@
data.put("count", array.size());
data.put("list", array);
if (page == 1) {
- List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
+ List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
+ acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
if (bannerList != null && bannerList.size() > 0)
data.put("topPicture", bannerList.get(0).getSrc());
else
data.put("topPicture", "");
- data.put("ruleUrl", configService.get("zigoulijian_rule"));
+ data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
}
out.print(JsonUtil.loadTrueResult(data));
}
@@ -649,7 +648,8 @@
.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
BigDecimal proportion = TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE;
- ConfigParamsDTO paramsDTO = new ConfigParamsDTO(proportion, proportion, Constant.MAX_REWARD_RATE);
+ ConfigParamsDTO paramsDTO = new ConfigParamsDTO(proportion, proportion, Constant.MAX_REWARD_RATE,
+ hongBaoManageService.getFanLiRate(UserLevelEnum.superVIP));
for (TLJBuyGoods hotGoods : listHot) {
TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
if (taoBaoGoodsBrief == null) {
@@ -703,14 +703,15 @@
data.put("count", array.size());
data.put("list", array);
if (page == 1) {
- List<SwiperPicture> bannerList = swiperPictureService.getByBannerCard("zigoulijian_banner");
+ List<SwiperPicture> bannerList = swiperPictureService.getByBannerCardAndVersion("zigoulijian_banner",
+ acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
if (bannerList != null && bannerList.size() > 0)
data.put("topPicture", bannerList.get(0).getSrc());
else
data.put("topPicture", "");
- data.put("ruleUrl", configService.get("zigoulijian_rule"));
+ data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
}
out.print(JsonUtil.loadTrueResult(data));
}
@@ -728,8 +729,6 @@
out.print(JsonUtil.loadFalseResult(1, "鎶辨瓑锛屾帹骞跨孩鍖呯浉鍏冲姛鑳藉凡涓嬬嚎锛�"));
}
-
-
/**
* 鏂颁汉绾㈠寘璇︽儏
*
@@ -752,7 +751,8 @@
}
// 2銆侀《閮ㄨ疆鎾浘
- List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("redpack_win_detail_banner");
+ List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion(
+ "redpack_win_detail_banner", acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
List<SwiperPicture> topPicList = new ArrayList<>();
if (oldtopPicList != null && oldtopPicList.size() > 0)
topPicList.addAll(oldtopPicList);
@@ -765,8 +765,7 @@
out.print(JsonUtil.loadFalseResult(1, "绾㈠寘宸茶鎶㈠厜鍟�"));
}
}
-
-
+
/**
* 鏂颁汉鍏嶅崟鍒楄〃
* @param acceptData
@@ -779,31 +778,32 @@
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�"));
return;
}
-
+
String day = TimeUtil.getGernalTime(java.lang.System.currentTimeMillis());
List<TLJFreeBuyGoods> listFree = tljFreeBuyGoodsService.listByDay(day);
if (listFree == null) {
listFree = new ArrayList<TLJFreeBuyGoods>();
}
-
+
JSONArray array = new JSONArray();
Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
.excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
- BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
- ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, fanLiRate, Constant.MAX_REWARD_RATE);
+ ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
+ acceptData.getVersion());
+
for (TLJFreeBuyGoods freeGoods : listFree) {
TaoBaoGoodsBrief goods = freeGoods.getGoods();
if (goods == null)
continue;
-
- // 璁$畻鍒稿悗浠� 1<= n <= 2
+
+ // 璁$畻鍒稿悗浠� 1<= n <= 2
BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(goods);
if (couplePrice.compareTo(new BigDecimal(1.0)) < 0 && couplePrice.compareTo(new BigDecimal(2.0)) > 0)
continue;
-
+
GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
-
+
// 涓撳睘鏍囩
List<ClientTextStyleVO> labels = new ArrayList<ClientTextStyleVO>();
labels.add(new ClientTextStyleVO("鏂颁汉涓撳睘", "#FE0014"));
@@ -825,12 +825,12 @@
JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, e.getMsg()));
return;
}
-
+
String state = "宸茶繃鏈�";
BigDecimal balance = new BigDecimal(0);
UserTaoLiJinNewbies winDetail = userTaoLiJinNewbiesService.selectByPrimaryKey(uid);
if (winDetail != null) {
- balance = winDetail.getMoney() ;
+ balance = winDetail.getMoney();
if (winDetail.getEndTime().getTime() > java.lang.System.currentTimeMillis()) {
try {
String remaining = DateUtil.dateDiff2(new Date(), winDetail.getEndTime());
@@ -841,12 +841,12 @@
}
}
}
-
+
String rule = configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule");
- rule.replace("{閾炬帴}", configService.get("customer_service_link"));
-
+ rule = rule.replace("{閾炬帴}", configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
+
data.put("state", state);
- data.put("balance","鏂颁汉绾㈠寘锛�" + balance.setScale(2) + "鍏�");
+ data.put("balance", "鏂颁汉绾㈠寘锛�" + balance.setScale(2) + "鍏�");
data.put("rule", rule);
}
JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
--
Gitblit v1.8.0