gongchunyi
8 小时以前 3e8957d6ff8e7af81326a58050afc4a508d19aa0
src/main/java/com/ruoyi/basic/service/impl/ProductModelServiceImpl.java
@@ -162,23 +162,22 @@
                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 parentNodeId = topId;
                Long currentParentId = topId;
                if (parentName != null) {
                    path = path + ">" + parentName;
                    parentNodeId = ensureChildNode(nodeCache, path, parentNodeId, parentName);
                    currentParentId = ensureChildNode(nodeCache, path, currentParentId, parentName);
                }
                path = path + ">" + categoryName;
                Long categoryId = ensureChildNode(nodeCache, path, parentNodeId, categoryName);
                if (categoryName != null) {
                    path = path + ">" + categoryName;
                    currentParentId = ensureChildNode(nodeCache, path, currentParentId, categoryName);
                }
                path = path + ">" + productName;
                Long leafId = ensureChildNode(nodeCache, path, categoryId, productName);
                Long leafId = ensureChildNode(nodeCache, path, currentParentId, productName);
                String code = trimToNull(row.getProductCode());
                if (code == null) {