gongchunyi
7 天以前 b85fa7072dc81336600bf10a443da9e1374f40f1
src/main/java/com/ruoyi/basic/service/impl/ProductModelServiceImpl.java
@@ -162,22 +162,23 @@
                String parentName = trimToNull(row.getProductParentName());
                String categoryName = trimToNull(row.getProductCategoryName());
                String productName = trimToNull(row.getProductName());
                if (categoryName == null) {
                    throw new ServiceException("第 " + rowNum + " 行 [产品大类] 不能为空");
                }
                if (productName == null) {
                    throw new ServiceException("第 " + rowNum + " 行 [产品名称] 不能为空");
                }
                String path = String.valueOf(topId);
                Long currentParentId = topId;
                Long parentNodeId = topId;
                if (parentName != null) {
                    path = path + ">" + parentName;
                    currentParentId = ensureChildNode(nodeCache, path, currentParentId, parentName);
                    parentNodeId = ensureChildNode(nodeCache, path, parentNodeId, parentName);
                }
                if (categoryName != null) {
                    path = path + ">" + categoryName;
                    currentParentId = ensureChildNode(nodeCache, path, currentParentId, categoryName);
                }
                Long categoryId = ensureChildNode(nodeCache, path, parentNodeId, categoryName);
                path = path + ">" + productName;
                Long leafId = ensureChildNode(nodeCache, path, currentParentId, productName);
                Long leafId = ensureChildNode(nodeCache, path, categoryId, productName);
                String code = trimToNull(row.getProductCode());
                if (code == null) {