yujian
2019-12-12 8c04d27e5cebb7e654c208533e9567c4df2c8acc
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, "红包余额不足");
         }