refactor: Relevance替换key为relkey

This commit is contained in:
yubaolee
2025-04-11 11:13:56 +08:00
parent 965a8ae2e8
commit ca9835a039
9 changed files with 48 additions and 65 deletions

View File

@@ -88,8 +88,8 @@ namespace OpenAuth.App
{
UnitWork.ExecuteWithTransaction(() =>
{
UnitWork.Delete<Relevance>(u=>(u.Key == Define.ROLEMODULE || u.Key == Define.ROLEELEMENT) && ids.Contains(u.FirstId));
UnitWork.Delete<Relevance>(u=>u.Key == Define.USERROLE && ids.Contains(u.SecondId));
UnitWork.Delete<Relevance>(u=>(u.RelKey == Define.ROLEMODULE || u.RelKey == Define.ROLEELEMENT) && ids.Contains(u.FirstId));
UnitWork.Delete<Relevance>(u=>u.RelKey == Define.USERROLE && ids.Contains(u.SecondId));
UnitWork.Delete<Role>(u =>ids.Contains(u.Id));
UnitWork.Save();
});