分类重排序修改
This commit is contained in:
@@ -265,6 +265,13 @@ func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int,
|
|||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if err = dao.GetEntitiesByKV(db, &cats, utils.Params2Map(model.FieldParentID, parentID), false); err == nil {
|
if err = dao.GetEntitiesByKV(db, &cats, utils.Params2Map(model.FieldParentID, parentID), false); err == nil {
|
||||||
catsLen := len(cats)
|
catsLen := len(cats)
|
||||||
|
if !isExd {
|
||||||
|
for _, v := range cats {
|
||||||
|
if v.IsExdSpec == 1 {
|
||||||
|
catsLen--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if catsLen != len(categoryIDs) {
|
if catsLen != len(categoryIDs) {
|
||||||
return ErrInputCatsDoesntMatch
|
return ErrInputCatsDoesntMatch
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user