瀏覽代碼

bug修复

wangqifan 3 年之前
父節點
當前提交
1fd9452c1d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/main/java/com/izouma/nineth/service/OrderPayService.java

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