From 3824cbcaec6e6c67418d5280a53e9c2fedeef6f9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 11 七月 2019 16:34:13 +0800
Subject: [PATCH] 订单bug,分享爆款自购修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
index 96f6077..3a76084 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsTextTemplateServiceImpl.java
@@ -15,8 +15,9 @@
 import com.yeshi.fanli.exception.goods.ShareGoodsTextTemplateException;
 import com.yeshi.fanli.service.inter.config.ConfigService;
 import com.yeshi.fanli.service.inter.goods.ShareGoodsTextTemplateService;
-import com.yeshi.fanli.service.inter.tlj.GoodsTaoLiJinRateService;
+import com.yeshi.fanli.service.inter.tlj.ConfigTaoLiJinService;
 import com.yeshi.fanli.util.taobao.TaoBaoUtil;
+import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
 
 /**
  * 鍒嗕韩鍟嗗搧妯℃澘
@@ -34,8 +35,10 @@
 	private ConfigService configService;
 	
 	@Resource
-	private GoodsTaoLiJinRateService goodsTaoLiJinRateService;
-
+	private ConfigTaoLiJinService configTaoLiJinService;
+	
+	
+	
 	@Override
 	public void saveCommonTemplate(Long uid, String template) throws ShareGoodsTextTemplateException {
 		isCommonTemplateRight(template);
@@ -167,7 +170,10 @@
 			String shortLink, boolean hasCoupon, Long tljId) {
 		
 		if (tljId != null) {
-			BigDecimal spreadMoney = goodsTaoLiJinRateService.getGoodsSpreadMoney(goods);
+			// 璁$畻鎺ㄥ箍绾㈠寘
+			String warningRate = configTaoLiJinService.getValueByKey("warning_value");
+			BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
+						
 			return template.replace("{鏍囬}", goods.getTitle()).replace("{鍟嗗搧鍘熶环}", BigDecimalUtil.getWithNoZera( goods.getZkPrice()).toString())
 					.replace("{鏈堥攢閲弣", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{棰嗗埜鐭摼}", shortLink)
 					.replace("{娣樺彛浠", token).replace("{浼樻儬鍒搁潰棰潁", BigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString())

--
Gitblit v1.8.0