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/util/factory/UserMoneyDetailFactory.java |   40 ++++++++++++++++++++++++++++++++++------
 1 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
index 277a7a4..421141c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
@@ -23,7 +23,7 @@
 	 * @param hongBaoList
 	 * @return
 	 */
-	public static UserMoneyDetail createFanLi(Long uid, String orderId, int orderType, Long hbId, BigDecimal money)
+	public static UserMoneyDetail createFanLi(Long uid, String orderId, int orderType, String hbIds, BigDecimal money)
 			throws UserMoneyDetailException {
 
 		if (StringUtil.isNullOrEmpty(orderId))
@@ -38,7 +38,7 @@
 		UserMoneyDetail detail = new UserMoneyDetail();
 		detail.setCreateTime(new Date());
 		detail.setIdentifyCode(StringUtil
-				.Md5(UserMoneyDetailTypeEnum.fanli.name() + "-" + uid + "-" + orderType + "-" + orderId + "-" + hbId));
+				.Md5(UserMoneyDetailTypeEnum.fanli.name() + "-" + uid + "-" + orderType + "-" + orderId + "-" + hbIds));
 		detail.setMoney(money);
 		detail.setTitle(UserMoneyDetailTypeEnum.fanli.getDesc());
 		detail.setType(UserMoneyDetailTypeEnum.fanli);
@@ -130,7 +130,6 @@
 		detail.setUserInfo(new UserInfo(uid));
 		return detail;
 	}
-
 
 	/**
 	 * 杩斿埄缁存潈
@@ -407,8 +406,6 @@
 		return createHongBaoDeduct(hb, "鏂颁汉绾㈠寘鎵i櫎");
 	}
 
-
-
 	/**
 	 * 杩斿埄濂栧姳
 	 * 
@@ -435,7 +432,38 @@
 		detail.setType(UserMoneyDetailTypeEnum.orderReward);
 		detail.setUpdateTime(new Date());
 		detail.setUserInfo(user);
-//		detail.setDescInfo("璁㈠崟鍙�:" + orderId);
+		// detail.setDescInfo("璁㈠崟鍙�:" + orderId);
+		return detail;
+	}
+
+	/**
+	 * 璁㈠崟閲嶅缁熻閫�娆�
+	 * 
+	 * @param orderId
+	 * @param money
+	 * @param user
+	 * @return
+	 * @throws UserMoneyDetailException
+	 */
+	public static UserMoneyDetail createRepeatStatistic(String orderId, BigDecimal money, UserInfo user)
+			throws UserMoneyDetailException {
+		if (StringUtil.isNullOrEmpty(orderId))
+			throw new UserMoneyDetailException(1, "璁㈠崟鍙蜂笉鑳戒负绌�");
+		if (user == null)
+			throw new UserMoneyDetailException(1, "UID涓嶈兘涓虹┖");
+		if (money == null)
+			throw new UserMoneyDetailException(1, "閲戦涓嶈兘涓虹┖");
+
+		UserMoneyDetail detail = new UserMoneyDetail();
+		detail.setCreateTime(new Date());
+		detail.setIdentifyCode(
+				StringUtil.Md5(UserMoneyDetailTypeEnum.repeatStatistic.name() + "-" + orderId + "-" + user.getId()));
+		detail.setMoney(money);
+		detail.setTitle(UserMoneyDetailTypeEnum.repeatStatistic.getDesc());
+		detail.setType(UserMoneyDetailTypeEnum.repeatStatistic);
+		detail.setUpdateTime(new Date());
+		detail.setUserInfo(user);
+		detail.setDescInfo("璁㈠崟鍙�:" + orderId);
 		return detail;
 	}
 

--
Gitblit v1.8.0