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/taobao/TaoBaoWeiQuanDrawBackServiceImpl.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoWeiQuanDrawBackServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoWeiQuanDrawBackServiceImpl.java
index 1359d54..63607eb 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoWeiQuanDrawBackServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoWeiQuanDrawBackServiceImpl.java
@@ -36,7 +36,6 @@
 import com.yeshi.fanli.log.LogHelper;
 import com.yeshi.fanli.service.inter.money.UserMoneyDebtService;
 import com.yeshi.fanli.service.inter.msg.UserMoneyMsgNotificationService;
-import com.yeshi.fanli.service.inter.order.CommonOrderService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoWeiQuanDrawBackService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoWeiQuanOrderService;
 import com.yeshi.fanli.service.inter.user.UserMoneyService;
@@ -44,7 +43,6 @@
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.MoneyBigDecimalUtil;
 import com.yeshi.fanli.util.StringUtil;
-import com.yeshi.fanli.util.TaoBaoConstant;
 import com.yeshi.fanli.util.factory.UserMoneyDetailFactory;
 import com.yeshi.fanli.vo.order.CommonOrderVO;
 
@@ -368,6 +366,8 @@
 
 			// 閫�娆鹃噾棰�
 			BigDecimal drawBackMoney = MoneyBigDecimalUtil.div(userGetMoney.multiply(fanMoney), sumFee);
+			if (drawBackMoney.compareTo(userGetMoney) > 0)
+				drawBackMoney = userGetMoney;
 
 			for (TaoBaoWeiQuanDrawBack drawBack : newWeiQuanDrawBackList)
 				taoBaoWeiQuanDrawBackMapper.insertSelective(drawBack);
@@ -488,6 +488,8 @@
 					if (weiQuanDrawBack != null)
 						continue;
 					BigDecimal drawBackMoney = MoneyBigDecimalUtil.div(child.getMoney().multiply(fanMoney), sumFee);
+					if (drawBackMoney.compareTo(child.getMoney()) > 0)
+						drawBackMoney = child.getMoney();
 					weiQuanDrawBack = new TaoBaoWeiQuanDrawBack();
 					weiQuanDrawBack.setCreateTime(new Date());
 					weiQuanDrawBack.setDrawBackMoney(drawBackMoney);

--
Gitblit v1.8.0