From c007868c62c7da5c9ce1bf0e77d9e5f8619826e4 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 12 六月 2019 12:24:09 +0800
Subject: [PATCH] 查询默认有效调整

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 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 361a7c3..7f98eab 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,4 +1029,9 @@
 		else
 			return money;
 	}
+
+	@Override
+	public List<HongBaoV2> listChildrenById(Long id) {
+		return hongBaoV2Mapper.listChildrenById(id);
+	}
 }

--
Gitblit v1.8.0