Explorar el Código

菜单硬删除

yxh hace 4 años
padre
commit
6ff2abc405
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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
 }