This commit is contained in:
邹宗楠
2023-06-02 17:50:58 +08:00
parent ba4c80a89b
commit b52bd5556f

View File

@@ -3728,7 +3728,7 @@ func UpdateStoreCategoryMap(ctx *jxcontext.Context, ID int, storeCategoryMap *mo
if storeCategoryMap.Level == 2 {
cat2, _ := dao.GetCategories(db, -1, 0, []int{storeCategoryMap.CategoryID}, false)
if len(cat2) > 0 {
if cat2[0].ParentID != storeCategoryMap.ParentID {
if cat2[0].ParentID != storeCategoryMap.ParentID && cat2[0].ParentID != model.NO {
return 0, fmt.Errorf("此二级分类只能绑定到对应一级分类下!")
}