zoujiajian 7 달 전
부모
커밋
451b0c51e2
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

+ 6 - 0
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -458,6 +458,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 		if (goodsDon == null || !goodsDon.getStatus()) {
 			throw new BusinessRuntimeException("商品已下架");
 		}
+		if (goodsDon.getIsSubscribeAlert()) {
+			throw BusinessRuntimeException.getInstance("该商品已下架暂不可购买");
+		}
+		if (sku != null && sku.getIsSubscribeAlert()) {
+			throw BusinessRuntimeException.getInstance("该规格已下架暂不可购买");
+		}
 		//是否参与店铺分销
 		if (yhsId > 0 && !goodsDon.getIsDistribute()) {
 			throw new BusinessRuntimeException("系统异常,请刷新页面重试");