分类重排序修改

This commit is contained in:
苏尹岚
2020-03-16 18:06:50 +08:00
parent 69f4bfcc10
commit 6e9c986325

View File

@@ -265,6 +265,13 @@ func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int,
db := dao.GetDB()
if err = dao.GetEntitiesByKV(db, &cats, utils.Params2Map(model.FieldParentID, parentID), false); err == nil {
catsLen := len(cats)
if !isExd {
for _, v := range cats {
if v.IsExdSpec == 1 {
catsLen--
}
}
}
if catsLen != len(categoryIDs) {
return ErrInputCatsDoesntMatch
}