24282 9 сар өмнө
parent
commit
6b4b410a75

+ 1 - 1
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -592,7 +592,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
                     if (collect.size() > 1) {
                         throw new ServiceException("同级存在多个相同名称的分类:" + split[i]);
                     }
-                    if (collect.size() == 0) {
+                    if (collect.isEmpty()) {
                         throw new ServiceException("分类不存在:" + split[i]);
                     }
                     productClassify = collect.get(0);