瀏覽代碼

菜单硬删除

yxh 4 年之前
父節點
當前提交
6ff2abc405
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/system/service/sys_auth_rule.go

+ 1 - 1
app/system/service/sys_auth_rule.go

@@ -217,7 +217,7 @@ func (s *rule) DeleteMenuByIds(ids []int) (err error) {
 		}
 	}
 	ids = append(ids, childrenIds...)
-	_, err = dao.SysAuthRule.Where("id in (?)", ids).Delete()
+	_, err = dao.SysAuthRule.Where("id in (?)", ids).Unscoped().Delete() // 硬删除
 	return
 }