饿鲜达分类修改等接口修改
This commit is contained in:
@@ -254,7 +254,7 @@ func SetStoreCategorySyncStatus2(db *dao.DaoDB, storeIDs []int, catIDs []int, sy
|
||||
return num, nil
|
||||
}
|
||||
|
||||
func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int, userName string) (err error) {
|
||||
func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int, userName string, isExd bool) (err error) {
|
||||
var cats []*model.SkuCategory
|
||||
db := dao.GetDB()
|
||||
if err = dao.GetEntitiesByKV(db, &cats, utils.Params2Map(model.FieldParentID, parentID), false); err == nil {
|
||||
@@ -279,7 +279,11 @@ func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int,
|
||||
dao.Rollback(db)
|
||||
return fmt.Errorf("分类:%d不在%d分类下", v, parentID)
|
||||
}
|
||||
catsMap[v].Seq = k
|
||||
if isExd {
|
||||
catsMap[v].ExdSeq = k
|
||||
} else {
|
||||
catsMap[v].Seq = k
|
||||
}
|
||||
catsMap[v].LastOperator = ctx.GetUserName()
|
||||
if _, err = dao.UpdateEntity(db, catsMap[v]); err != nil {
|
||||
dao.Rollback(db)
|
||||
|
||||
Reference in New Issue
Block a user