fix: 修复公告过时警告并补齐用户权限
This commit is contained in:
@@ -50,7 +50,9 @@ public sealed class EfTenantAnnouncementRepository(TakeoutAppDbContext context)
|
||||
|
||||
if (isActive.HasValue)
|
||||
{
|
||||
query = query.Where(x => x.IsActive == isActive.Value);
|
||||
query = isActive.Value
|
||||
? query.Where(x => x.Status == AnnouncementStatus.Published)
|
||||
: query.Where(x => x.Status != AnnouncementStatus.Published);
|
||||
}
|
||||
|
||||
if (effectiveFrom.HasValue)
|
||||
@@ -114,7 +116,9 @@ public sealed class EfTenantAnnouncementRepository(TakeoutAppDbContext context)
|
||||
|
||||
if (isActive.HasValue)
|
||||
{
|
||||
announcementQuery = announcementQuery.Where(x => x.IsActive == isActive.Value);
|
||||
announcementQuery = isActive.Value
|
||||
? announcementQuery.Where(x => x.Status == AnnouncementStatus.Published)
|
||||
: announcementQuery.Where(x => x.Status != AnnouncementStatus.Published);
|
||||
}
|
||||
|
||||
if (effectiveAt.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user