yuhaitao14 7 years ago
parent
commit
7ecfbd1db1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      shop/src/main/java/com/zskk/shop/service/BuyOrderService.java

+ 4 - 1
shop/src/main/java/com/zskk/shop/service/BuyOrderService.java

@@ -234,8 +234,11 @@ public class BuyOrderService {
 		if (item == null){
 			throw new ZSKKException(ErrorConstant.PARAM_ERROR);
 		}
-		
 		BuyOrder order 	= this.queryBuyOrder(item.getBid());
+		if (!order.getPayStatus().equals(PAY_STATUS_PAYED)){
+			throw new ZSKKException(ErrorConstant.PARAM_ERROR);
+		}
+		
 		String refundid = order.getOrderid() + "_" + item.getId();
 		userCenterService.refund(order, item, refundid);