From e65037e672ecab852e2a6c5b242cdadfd1a58b33 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 25 十一月 2019 09:30:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java
index 614fb40..9ed1b30 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java
@@ -40,6 +40,7 @@
 import com.yeshi.fanli.service.inter.money.msg.UserMoneyMsgNotificationService;
 import com.yeshi.fanli.service.inter.mq.MQUnSendInfoService;
 import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService;
+import com.yeshi.fanli.service.inter.redpack.RedPackForbidService;
 import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsClassService;
 import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsService;
 import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
@@ -90,6 +91,10 @@
 
 	@Resource
 	private UserMoneyMsgNotificationService userMoneyMsgNotificationService;
+	
+	@Resource
+	private RedPackForbidService redPackForbidService;
+	
 
 	@Transactional
 	@Override
@@ -435,13 +440,11 @@
 			throw new BanLiShopOrderException(22, "鍟嗗搧宸蹭笅绾�");
 		}
 
+		if(redPackForbidService.verifyForbid(uid))
+			throw new BanLiShopOrderException(25, "绾㈠寘鍔熻兘宸茶灏佺");
+		
 		if (pay.getHongBaoPrice() != null && pay.getHongBaoPrice().compareTo(new BigDecimal(0)) > 0) {
-			BigDecimal money = null;
-			try {
-				money = redPackBalanceService.getBalance(uid);
-			} catch (RedPackBalanceException e) {
-				throw new BanLiShopOrderException(25, "绾㈠寘鍔熻兘寮傚父");
-			}
+			BigDecimal money = redPackBalanceService.getBalance(uid);
 			if (money.compareTo(pay.getHongBaoPrice()) < 0) {
 				throw new BanLiShopOrderException(24, "绾㈠寘浣欓涓嶈冻");
 			}

--
Gitblit v1.8.0