浏览代码

bugfix:导入模板类修改,

lyx 2 周之前
父节点
当前提交
cacf31edcf

+ 3 - 3
alien-entity/src/main/java/shop/alien/entity/store/excelVo/BusinessSectionExcelVo.java

@@ -17,15 +17,15 @@ import shop.alien.entity.store.excelVo.util.ExcelHeader;
 @ApiModel(value = "BusinessSectionExcelVo对象", description = "经营版块Excel导入导出对象")
 public class BusinessSectionExcelVo {
 
-    @ExcelHeader("一级分类名称")
+    @ExcelHeader("经营板块")
     @ApiModelProperty(value = "一级分类名称(必填,如果二级和三级为空,则创建一级分类)")
     private String firstLevelName;
 
-    @ExcelHeader("二级分类名称")
+    @ExcelHeader("经营种类")
     @ApiModelProperty(value = "二级分类名称(可选,如果三级为空,则创建二级分类)")
     private String secondLevelName;
 
-    @ExcelHeader("三级分类名称")
+    @ExcelHeader("分类")
     @ApiModelProperty(value = "三级分类名称(可选,如果填写则创建三级分类)")
     private String thirdLevelName;
 

+ 2 - 2
alien-store/src/main/java/shop/alien/store/service/impl/PlatformBusinessSectionServiceImpl.java

@@ -733,7 +733,7 @@ public class PlatformBusinessSectionServiceImpl extends ServiceImpl<StoreDiction
                                      int level, String hidden, List<String> errorMessages, int rowIndex) {
         try {
             // 查找或创建一级分类
-            StoreDictionary firstLevel = findOrCreateLevel(firstLevelName, 0, 0, hidden);
+            StoreDictionary firstLevel = findOrCreateLevel(firstLevelName, null, 0, hidden);
             if (firstLevel == null) {
                 throw new IllegalArgumentException("创建一级分类失败");
             }
@@ -798,7 +798,7 @@ public class PlatformBusinessSectionServiceImpl extends ServiceImpl<StoreDiction
         } else if (expectedLevel == 2) {
             newDict.setTypeDetail("分类");
         }
-        newDict.setParentId(parentId == null ? 0 : parentId);
+        newDict.setParentId(parentId == null ? null : parentId);
         newDict.setHidden(StringUtils.isNotBlank(hidden) && hidden.equals("隐藏") ? 1 : 0);
         newDict.setDeleteFlag(0);
         newDict.setCreatedTime(new Date());