Browse Source

简化 IsView 属性的赋值逻辑

在 `GroupsController.cs` 文件中,移除了 `IsView` 属性的三元运算符,直接将查询结果赋值给 `IsView`。这样,`IsView` 属性将直接反映查询的布尔值,提升了代码的可读性和简洁性。
LEIYI 2 months ago
parent
commit
8d1a608f65
1 changed files with 1 additions and 1 deletions
  1. 1 1
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 1 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -9241,7 +9241,7 @@ FROM
                     Id = x.Id,
                     GroupName = x.TeamName,
                     IsNull = SqlFunc.Subqueryable<Grp_EnterExitCost>().Where(x1 => x1.DiId == x.Id && x1.IsDel == 0).Any() ? false : true,
-                    IsView = SqlFunc.Subqueryable<Grp_EnterExitCostPermission>().Where(x1 => x1.GroupId == x.Id && x1.UserId == dto.CurrUserId).Any() ? false : true,
+                    IsView = SqlFunc.Subqueryable<Grp_EnterExitCostPermission>().Where(x1 => x1.GroupId == x.Id && x1.UserId == dto.CurrUserId).Any(),
                 })
                 .ToPageListAsync(dto.PageIndex, dto.PageSize, total);