wangqifan 3 ani în urmă
părinte
comite
1fd9452c1d

+ 3 - 2
src/main/java/com/izouma/nineth/service/OrderPayService.java

@@ -719,12 +719,13 @@ public class OrderPayService {
         if (LocalDateTime.now().compareTo(tradeAuction.getCurrentStartTime()) < 0) {
             throw new BusinessException("未到竞价时间");
         }
-        if (!tradeAuction.getStatus().equals(TradeAuctionStatus.ONGOING)) {
+        if (!tradeAuction.getStatus().equals(TradeAuctionStatus.ONGOING) & tradeAuction.getStatus()
+                .equals(TradeAuctionStatus.PURCHASED)) {
             throw new BusinessException("易拍产品未处在竞价状态");
         }
         if (order.getPaymentType().equals(AuctionPaymentType.DEPOSIT)) {
             if (order.getPrice().compareTo(tradeAuction.getNextPrice()) != 0) {
-                throw new BusinessException("购买资格已经没有");
+                throw new BusinessException("已经失去购买资格");
             }
         }
         checkTradeCode(userId, tradeCode, order.getUserId());