|
@@ -409,6 +409,13 @@ func ImportResourceData(path string, resourceType int, sysUser *system.Admin) (s
|
|
|
classifyNameMap := make(map[string]int)
|
|
|
for _, v := range classifyList {
|
|
|
name := fmt.Sprintf("%s/%s/%s", v.RootName, v.ParentName, v.ClassifyName)
|
|
|
+ if v.RootName == "" && v.ParentName == "" { //一级分类
|
|
|
+ name = fmt.Sprintf("%s/%s/%s", v.ClassifyName, "", "")
|
|
|
+ } else if v.RootName == "" { //二级分类
|
|
|
+ name = fmt.Sprintf("%s/%s/%s", v.ParentName, v.ClassifyName, "")
|
|
|
+ }
|
|
|
+
|
|
|
+ fmt.Println("name", name)
|
|
|
classifyNameMap[name] = v.ClassifyId
|
|
|
}
|
|
|
|