From 00ae1ad282df5afa8205c11e86755ff311402ece Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 15 八月 2019 11:08:23 +0800
Subject: [PATCH] 淘礼金规则修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJBuyGoodsServiceImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 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 fbcecc4..6a9dd20 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
@@ -91,6 +91,16 @@
 		List<TLJBuyGoods> goodsList = new ArrayList<>();
 		for (TaoBaoUnionConfig appInfo : configList) {
 			List<TLJBuyGoods> list = listByDay(appInfo.getAppKey(), day, 10);
+			if (list != null)
+				for (int i = 0; i < list.size(); i++) {
+					// 杩囨护娣樼ぜ閲戝ぇ浜�10鍧楅挶鐨�
+					BigDecimal hongBao = TaoBaoUtil.getGoodsHongBaoMoney(list.get(i).getGoods(),
+							TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE);
+					if (hongBao.compareTo(new BigDecimal(10)) > 0) {
+						list.remove(i--);
+					}
+				}
+
 			if (list != null && list.size() > 0)
 				goodsList.addAll(list);
 		}
@@ -157,7 +167,7 @@
 	}
 
 	@Override
-	public boolean verifyCanCreateTLJ(Long auctionId,TaoKeAppInfo app) {
+	public boolean verifyCanCreateTLJ(Long auctionId, TaoKeAppInfo app) {
 		TaoLiJinDTO taoLiJinDTO = null;
 		try {
 			taoLiJinDTO = TaoKeApiUtil.createTaoLiJin(auctionId, "娣樼ぜ閲戦獙璇�", new BigDecimal("1.00"), 1, new Date(),

--
Gitblit v1.8.0