|
@@ -133,7 +133,11 @@ func initFixSelfEdbClassify(classifyType int) {
|
|
|
}
|
|
|
hasClassifyIdStrList = append(hasClassifyIdStrList, v.ClassifyIdPath)
|
|
|
}
|
|
|
- classifyIdStrList := strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+
|
|
|
+ classifyIdStrList := make([]string, 0)
|
|
|
+ if len(hasClassifyIdStrList) > 0 {
|
|
|
+ classifyIdStrList = strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ }
|
|
|
classifyIdMap := make(map[string]bool)
|
|
|
for _, v := range classifyIdStrList {
|
|
|
classifyIdMap[v] = true
|
|
@@ -256,7 +260,10 @@ func deleteNullEdbClassify(classifyType int) {
|
|
|
for _, v := range hasEdbClassifyList {
|
|
|
hasClassifyIdStrList = append(hasClassifyIdStrList, v.ClassifyIdPath)
|
|
|
}
|
|
|
- classifyIdStrList := strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ classifyIdStrList := make([]string, 0)
|
|
|
+ if len(hasClassifyIdStrList) > 0 {
|
|
|
+ classifyIdStrList = strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ }
|
|
|
for _, v := range classifyIdStrList {
|
|
|
classifyId, err := strconv.Atoi(v)
|
|
|
if err != nil {
|
|
@@ -425,7 +432,10 @@ func initFixSelfChartClassify() {
|
|
|
}
|
|
|
hasClassifyIdStrList = append(hasClassifyIdStrList, v.ChartClassifyIdPath)
|
|
|
}
|
|
|
- classifyIdStrList := strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ classifyIdStrList := make([]string, 0)
|
|
|
+ if len(hasClassifyIdStrList) > 0 {
|
|
|
+ classifyIdStrList = strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ }
|
|
|
classifyIdMap := make(map[string]bool)
|
|
|
for _, v := range classifyIdStrList {
|
|
|
classifyIdMap[v] = true
|
|
@@ -547,7 +557,11 @@ func deleteNullChartClassify() {
|
|
|
for _, v := range hasEdbClassifyList {
|
|
|
hasClassifyIdStrList = append(hasClassifyIdStrList, v.ChartClassifyIdPath)
|
|
|
}
|
|
|
- classifyIdStrList := strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+
|
|
|
+ classifyIdStrList := make([]string, 0)
|
|
|
+ if len(hasClassifyIdStrList) > 0 {
|
|
|
+ classifyIdStrList = strings.Split(strings.Join(hasClassifyIdStrList, ","), ",")
|
|
|
+ }
|
|
|
for _, v := range classifyIdStrList {
|
|
|
classifyId, err := strconv.Atoi(v)
|
|
|
if err != nil {
|