From f4548a3ee46afe45da4ee2a42dc169c575deee9f Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期三, 31 七月 2019 11:57:36 +0800 Subject: [PATCH] 动态v2兼容 --- fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java index 38cc76b..307d1eb 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java @@ -62,7 +62,17 @@ @Cacheable(value = "commonContentCache", key = "'tljBuy-listByDay'+#day") @Override public List<TLJBuyGoods> listByDay(String day) { - return listByDay(day, 10); + List<TLJBuyGoods> list = listByDay(day, 10); + // if (list.size() <= 10) + // return list; + // else { + // List<TLJBuyGoods> newList = new ArrayList<>(); + // for (int i = 0; i < 10; i++) { + // newList.add(list.get(i)); + // } + // return newList; + // } + return list; } @Override @@ -70,19 +80,8 @@ List<TLJBuyGoods> list = tljBuyGoodsDao.listByDayOrderByUpdateTime(day, 1, count); List<TaoBaoGoodsBrief> goodsList = new ArrayList<>(); if (list != null) { - for (TLJBuyGoods shg : list) { - // 璁$畻鎺ㄥ箍绾㈠寘 - BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(shg.getGoods(), - TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE); - BigDecimal finalPrice = TaoBaoUtil.getAfterUseCouplePrice(shg.getGoods()); - - // 鎺ㄥ箍绾㈠寘 涓嶈兘灏忎簬1,浠锋牸涓嶈兘澶т簬30 - if (spreadMoney.compareTo(new BigDecimal(1.0)) < 0 || finalPrice.compareTo(new BigDecimal(30)) >= 0) { - continue; - } - + for (TLJBuyGoods shg : list) goodsList.add(shg.getGoods()); - } } // 杩囨护涓嬬嚎鍟嗗搧 goodsList = taoBaoGoodsBriefService.filterOffLineGoods(goodsList); -- Gitblit v1.8.0