From c4d752a1d340652d9c7d2abb5abff65cdee40d69 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期一, 20 五月 2019 09:13:56 +0800
Subject: [PATCH] 邀请素材管理、邀请素材画图

---
 fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 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 8d09ae6..0aab3ff 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
@@ -706,7 +706,7 @@
 		tg.setState(tb.getState()); // 鐘舵�侊細2018-12-03
 		if (tb.getCouponAmount().compareTo(BigDecimal.valueOf(0)) > 0) {
 			
-			tg.setCoupon(true);// 鏈夊埜
+			tg.setCoupon(true);// 鏈夊埜 
 			
 			TaoBaoQuanInfo quanInfo = new TaoBaoQuanInfo();
 			quanInfo.setCouponAmount(tb.getCouponAmount());
@@ -718,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);
@@ -761,15 +761,14 @@
 
 		tg.setTaoBaoHongBaoInfo(hongBaoInfo);
 
+		tg.setMoneyType(1);
+		tg.setSalesType(1);
 		// 娴嬭瘯浣跨敤
-//		tg.setMoneyType(Math.random() > 0.5 ? 1 : 2);
-//		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"));
-//		tg.setLabels(labels);
-
+		// tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3);
+		 List<ClientTextStyleVO> labels = new ArrayList<>();
+		 labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#F14242"));
+		 labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#00FF00"));
+		 tg.setLabels(labels);
 		return tg;
 	}
 
@@ -1013,14 +1012,16 @@
 		}
 		tg.setTaoBaoHongBaoInfo(hongBaoInfo);
 
+		tg.setMoneyType(1);
+		tg.setSalesType(1);
 		// 娴嬭瘯浣跨敤
-//		tg.setMoneyType(Math.random() > 0.5 ? 1 : 2);
-//		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"));
-//		tg.setLabels(labels);
+		// tg.setMoneyType(Math.random() > 0.5 ? 1 : 2);
+		// 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("鏍囩鍐呭", "#F14242"));
+		 labels.add(new ClientTextStyleVO("鏍囩鍐呭", "#000000"));
+		 tg.setLabels(labels);
 
 		return tg;
 	}

--
Gitblit v1.8.0