소스 검색

fix 校验平台不存在

zoujiajian 3 년 전
부모
커밋
af0e9e0efc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      netflix-service/src/main/java/com/cyksj/service/distribute/impl/DistributeServiceImpl.java

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/distribute/impl/DistributeServiceImpl.java

@@ -46,7 +46,7 @@ public class DistributeServiceImpl implements DistributeService {
 				throw new BusinessRuntimeException("比例错误");
 			}
 			GoodsDon goodsDon = goodsDonMapper.selectById(rate.getGoodsId());
-			if (goodsDon == null || goodsDon.getType() == 2) {
+			if (goodsDon == null || !goodsDon.getDeleted() || goodsDon.getType() == 2) {
 				throw new BusinessRuntimeException("平台错误");
 			}
 			rate.setDistributeId(userDistribute.getId());
@@ -68,7 +68,7 @@ public class DistributeServiceImpl implements DistributeService {
 				throw new BusinessRuntimeException("比例错误");
 			}
 			GoodsDon goodsDon = goodsDonMapper.selectById(rate.getGoodsId());
-			if (goodsDon == null || goodsDon.getType() == 2) {
+			if (goodsDon == null || !goodsDon.getDeleted() || goodsDon.getType() == 2) {
 				throw new BusinessRuntimeException("平台错误");
 			}
 			rate.setDistributeId(userDistribute.getId());