From 84b968d16a1f58dcd46aaa39d9593ef86189df04 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 21 五月 2020 12:13:47 +0800
Subject: [PATCH] 添加活动名称

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsSourceOrderUserMapServiceImpl.java |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsSourceOrderUserMapServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsSourceOrderUserMapServiceImpl.java
index f06dcf4..70569c8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsSourceOrderUserMapServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsSourceOrderUserMapServiceImpl.java
@@ -37,6 +37,7 @@
 			TeamDividentsSourceOrderUserMap update = new TeamDividentsSourceOrderUserMap();
 			update.setId(id);
 			update.setState(TeamDividentsSourceOrderUserMap.STATE_YILINGQU);
+			update.setSendTime(new Date());
 			update.setUpdateTime(new Date());
 			teamDividentsSourceOrderUserMapMapper.updateByPrimaryKeySelective(update);
 		}
@@ -118,6 +119,14 @@
 			}
 	}
 
+	@Override
+	public void invalidOrderBySourceUid(Long sourceUid, String beiZhu) {
+		List<Integer> stateList = new ArrayList<>();
+		stateList.add(TeamDividentsSourceOrderUserMap.STATE_FK);
+		stateList.add(TeamDividentsSourceOrderUserMap.STATE_JS);
+		teamDividentsSourceOrderUserMapMapper.invalidOrderBySourceUid(sourceUid, beiZhu, stateList);
+	}
+
 	@Transactional
 	@Override
 	public void orderSettle(Long sourceOrderId, Date preSendTime, BigDecimal income) {
@@ -128,9 +137,10 @@
 
 					TeamDividentsSourceOrderUserMap update = new TeamDividentsSourceOrderUserMap();
 					update.setId(map.getId());
-					update.setMoney(MoneyBigDecimalUtil.div(income.multiply(map.getRate()), new BigDecimal(100), 4));
+					update.setMoney(MoneyBigDecimalUtil.div(income.multiply(map.getRate()), new BigDecimal(100), 3));
 					update.setUpdateTime(new Date());
 					update.setState(TeamDividentsSourceOrderUserMap.STATE_JS);
+					update.setPreSendTime(preSendTime);
 					teamDividentsSourceOrderUserMapMapper.updateByPrimaryKeySelective(update);
 				}
 			}
@@ -145,11 +155,18 @@
 				if (map.getState() == TeamDividentsSourceOrderUserMap.STATE_FK) {
 					TeamDividentsSourceOrderUserMap update = new TeamDividentsSourceOrderUserMap();
 					update.setId(map.getId());
-					update.setMoney(MoneyBigDecimalUtil.div(income.multiply(map.getRate()), new BigDecimal(100), 4));
+					update.setMoney(MoneyBigDecimalUtil.div(income.multiply(map.getRate()), new BigDecimal(100), 3));
 					update.setUpdateTime(new Date());
 					teamDividentsSourceOrderUserMapMapper.updateByPrimaryKeySelective(update);
 				}
 			}
 	}
 
+	
+	@Override
+	public List<TeamDividentsSourceOrderUserMap> listBySourceOrderIdAndTargetUid(Long sourceOrderId, Long targetUid) {
+		return teamDividentsSourceOrderUserMapMapper.list(sourceOrderId, null, targetUid, null, null, null, 0, 10000);
+	}
+	
+	
 }

--
Gitblit v1.8.0