Administrator
2020-02-23 388be9f734f5b80c348bcc956726c206002e832a
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderServiceImpl.java
@@ -91,12 +91,11 @@
   @Resource
   private UserMoneyMsgNotificationService userMoneyMsgNotificationService;
   @Resource
   private RedPackForbidService redPackForbidService;
   @Transactional(rollbackFor=Exception.class)
   @Transactional(rollbackFor = Exception.class)
   @Override
   public void addOrder(BanLiShopOrder order) throws BanLiShopOrderException {
      // 查询必要的参数是否添加
@@ -224,7 +223,7 @@
      banLiShopOrderMapper.updateByPrimaryKeySelective(order);
   }
   @Transactional(rollbackFor=Exception.class)
   @Transactional(rollbackFor = Exception.class)
   @Override
   public void payOrderByHongBao(Long orderId) throws BanLiShopOrderException, RedPackBalanceException {
      BanLiShopOrder order = banLiShopOrderMapper.selectByPrimaryKeyForUpdate(orderId);
@@ -329,6 +328,7 @@
      return banLiShopOrderMapper.selectByPrimaryKeyForUpdate(id);
   }
   @Transactional(rollbackFor = Exception.class)
   @Override
   public void invalidOrderByOrderId(Long id, String desc) {
      // 判断订单是否存在
@@ -347,8 +347,8 @@
               if (isS)// 支付成功,重新发送支付成功消息
               {
                  BanLiShopOrderMQMsg msg = new BanLiShopOrderMQMsg(order.getId(), order.getUid());
                  Message message =MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER,
                        OrderTopicTagEnum.banLiShopOrderPaid,msg);
                  Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER,
                        OrderTopicTagEnum.banLiShopOrderPaid, msg);
                  producer.send(message);
                  return;
               }
@@ -379,8 +379,8 @@
      if (order.getState() != BanLiShopOrder.STATE_PAID)
         throw new BanLiShopOrderException(1, "订单未处于待审核状态");
      Message message =MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.banLiShopOrderRefund,
         new BanLiShopOrderMQMsg(order.getId(), order.getUid()));
      Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.banLiShopOrderRefund,
            new BanLiShopOrderMQMsg(order.getId(), order.getUid()));
      try {
         orderTransactionProducer.send(message, new LocalTransactionExecuter() {
            @Override
@@ -440,9 +440,9 @@
         throw new BanLiShopOrderException(22, "商品已下线");
      }
      if(redPackForbidService.verifyForbid(uid))
      if (redPackForbidService.verifyForbid(uid))
         throw new BanLiShopOrderException(25, "红包功能已被封禁");
      if (pay.getHongBaoPrice() != null && pay.getHongBaoPrice().compareTo(new BigDecimal(0)) > 0) {
         BigDecimal money = redPackBalanceService.getBalance(uid);
         if (money.compareTo(pay.getHongBaoPrice()) < 0) {