Selaa lähdekoodia

Merge branch 'feature/eta2.2.6_material' into debug

xyxie 1 kuukausi sitten
vanhempi
commit
2d48e6eb46
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 2 2
      controllers/material/material.go
  2. 1 1
      services/material/material.go

+ 2 - 2
controllers/material/material.go

@@ -107,9 +107,9 @@ func (this *MaterialController) AddMaterialClassify() {
 		return
 	}
 	if req.ParentId > 0 {
-		levelPath = fmt.Sprintf("%s,%d", levelPath, classifyId)
+		levelPath = fmt.Sprintf("%s%d,", levelPath, classifyId)
 	} else {
-		levelPath = fmt.Sprintf("%d", classifyId)
+		levelPath = fmt.Sprintf("%d,", classifyId)
 	}
 	classify.ClassifyId = int(classifyId)
 	classify.LevelPath = levelPath

+ 1 - 1
services/material/material.go

@@ -353,7 +353,7 @@ func MoveMaterialClassify(classifyInfo *material.MaterialClassify, req *material
 				err = fmt.Errorf("获取父级分类失败,Err:" + e.Error())
 				return
 			}
-			levelPath = fmt.Sprintf("%s,%d", parentClassify.LevelPath, classifyInfo.ClassifyId)
+			levelPath = fmt.Sprintf("%s%d,", parentClassify.LevelPath, classifyInfo.ClassifyId)
 			classifyInfo.LevelPath = levelPath
 			updateCol = append(updateCol, "LevelPath")
 		}