wangqifan 4 лет назад
Родитель
Сommit
008fab86ca

+ 3 - 0
src/main/java/com/izouma/nineth/service/AuctionOrderService.java

@@ -197,6 +197,9 @@ public class AuctionOrderService {
 
     public void notify(Long id, PayMethod payMethod, String transactionId) {
         AuctionOrder order = auctionOrderRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        if (!order.getStatus().equals(AuctionOrderStatus.NOT_PAID)) {
+            throw new BusinessException("订单已处理");
+        }
         AuctionActivity auction = auctionActivityRepo.findById(order.getAuctionId())
                 .orElseThrow(new BusinessException("无拍卖活动"));
 

+ 7 - 6
src/main/java/com/izouma/nineth/web/SandPayController.java

@@ -30,12 +30,13 @@ import java.nio.charset.StandardCharsets;
 @AllArgsConstructor
 public class SandPayController {
 
-    private SandPayService    sandPayService;
-    private SnowflakeIdWorker snowflakeIdWorker;
-    private GeneralProperties generalProperties;
-    private RocketMQTemplate  rocketMQTemplate;
-    private GiftOrderService  giftOrderService;
-    private MintOrderService  mintOrderService;
+    private SandPayService      sandPayService;
+    private AuctionOrderService auctionOrderService;
+    private SnowflakeIdWorker   snowflakeIdWorker;
+    private GeneralProperties   generalProperties;
+    private RocketMQTemplate    rocketMQTemplate;
+    private GiftOrderService    giftOrderService;
+    private MintOrderService    mintOrderService;
     private UserBalanceService userBalanceService;
     private AuctionOrderService auctionOrderService;