1
0
DingXiaoYu 2 лет назад
Родитель
Сommit
9423824846

+ 1 - 1
src/main/java/com/seecoder/BlueWhale/serviceImpl/ProductServiceImpl.java

@@ -25,7 +25,7 @@ public class ProductServiceImpl implements ProductService {
 
     @Override
     public Boolean create(ProductVO productVO) {
-        if (productRepository.findByStoreIdAndName(productVO.getStoreId(),productVO.getName())==null){
+        if (productRepository.findByStoreIdAndName(productVO.getStoreId(),productVO.getName())!=null){
             throw BlueWhaleException.nameAlreadyExists();
         }
         Product product=productVO.toPO();