From 9b4bf99c1a30f3a7c2bdd6faba7589ff4f7e48e5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 22 五月 2019 10:28:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
index 13e4315..c59fe2c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -63,6 +63,7 @@
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.TaoBaoHttpUtil;
 import com.yeshi.fanli.util.TimeUtil;
+import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
 
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
@@ -703,7 +704,10 @@
 		tg.setUserType(tb.getUserType());
 		tg.setShopTitle(tb.getShopTitle());
 		tg.setState(tb.getState()); // 鐘舵�侊細2018-12-03
-		if (tb.getCouponAmount().compareTo(BigDecimal.valueOf(0)) == 1) {
+		if (tb.getCouponAmount().compareTo(BigDecimal.valueOf(0)) > 0) {
+
+			tg.setCoupon(true);// 鏈夊埜
+
 			TaoBaoQuanInfo quanInfo = new TaoBaoQuanInfo();
 			quanInfo.setCouponAmount(tb.getCouponAmount());
 			String couponEffectiveEndTime = tb.getCouponEffectiveEndTime();
@@ -714,7 +718,7 @@
 			quanInfo.setCouponLeftCount(tb.getCouponLeftCount());
 			quanInfo.setCouponLink(
 					TaoBaoCouponUtil.getCoupleUrl(tb.getCouponActivityId(), pid, tb.getAuctionId() + ""));
-			quanInfo.setCouponPrice(tb.getZkPrice().subtract(tb.getTkCommFee()));
+			quanInfo.setCouponPrice(MoneyBigDecimalUtil.sub(tg.getZkPrice(), tb.getCouponAmount()));
 			quanInfo.setCouponStartFee(tb.getCouponStartFee());
 			quanInfo.setCouponTotalCount(tb.getCouponTotalCount());
 			tg.setTaoBaoQuanInfo(quanInfo);
@@ -762,10 +766,9 @@
 		// 娴嬭瘯浣跨敤
 		// tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3);
 		// List<ClientTextStyleVO> labels = new ArrayList<>();
-		// labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#FF0000"));
-		// labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#00FF00"));
+		// labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#F14242"));
+		// labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#00FF00"));
 		// tg.setLabels(labels);
-
 		return tg;
 	}
 
@@ -1016,8 +1019,8 @@
 		// tg.setSalesType(Math.random() > 0.5 ? 1 : 2);
 		// tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3);
 		// List<ClientTextStyleVO> labels = new ArrayList<>();
-		// labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#FF0000"));
-		// labels.add(new ClientTextStyleVO("鏍囩娴嬭瘯鍐呭", "#00FF00"));
+		// labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#F14242"));
+		// labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#000000"));
 		// tg.setLabels(labels);
 
 		return tg;

--
Gitblit v1.8.0