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/hongbao/HongBaoV2ServiceImpl.java |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
index 7cf4837..6f59edf 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java
@@ -183,8 +183,6 @@
 					BigDecimal money = notify.getMoney();
 					switch (t) {
 					case HongBaoV2.TYPE_ZIGOU:
-						userNotificationService.orderFanliStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK,
-								null, money);
 						userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, commonOrder.getPayment(),
 								money, goodsCount, state);
 						break;
@@ -602,8 +600,7 @@
 								.setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney()));
 						notificationMap.put(child.getType(), tempHongBaoOrder);
 					}
-					
-					
+
 				}
 		} else
 			throw new HongBaoException(2, "type閿欒");
@@ -729,6 +726,10 @@
 					firstHongbao.setMoney(
 							MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstRate.divide(new BigDecimal(100))));
 				}
+				//杩斿埄涓�0鐨勪笉閫氱煡
+				if (firstHongbao.getMoney() == null || firstHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
+					return;
+
 				hongBaoV2Mapper.insertSelective(firstHongbao);
 				// 鐢ㄦ埛閫氱煡
 				if (notificationMap.get(HongBaoV2.TYPE_YIJI) == null) {
@@ -776,6 +777,11 @@
 						secondHongbao.setMoney(
 								MoneyBigDecimalUtil.mul(hongBao.getMoney(), secondRate.divide(new BigDecimal(100))));
 					}
+					
+					//杩斿埄涓�0鐨勪笉缁熻
+					if (secondHongbao.getMoney() == null || secondHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
+						return;
+
 					hongBaoV2Mapper.insertSelective(secondHongbao);
 
 					// 鐢ㄦ埛閫氱煡
@@ -1023,9 +1029,14 @@
 		else
 			return money;
 	}
+
+	@Override
+	public List<HongBaoV2> listChildrenById(Long id) {
+		return hongBaoV2Mapper.listChildrenById(id);
+	}
 	
 	@Override
-	public List<HongBaoV2> listChildrenById(Long id){
-		return hongBaoV2Mapper.listChildrenById(id);
+	public List<Long> getUidByNear30DayShareSucceed(){
+		return hongBaoV2Mapper.getUidByNear30DayShareSucceed();
 	}
 }

--
Gitblit v1.8.0