瀏覽代碼

惯用语

田爽 4 月之前
父節點
當前提交
a9e5b3f2b4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Hotline.Api/Controllers/SysController.cs

+ 2 - 2
src/Hotline.Api/Controllers/SysController.cs

@@ -489,8 +489,8 @@ namespace Hotline.Api.Controllers
         [HttpGet("common-list")]
         public async Task<IReadOnlyList<SystemCommonOpinion>> GetCommon([FromQuery] ECommonType commonType, bool isOpen)
         {
-            return await _commonOpinionRepository.Queryable().Where(x => x.CommonType == commonType && x.IsOpen == isOpen)
-                .WhereIF(isOpen == false, x => (x.CreatorId == _sessionContext.RequiredUserId && x.AttributionType == ECommonAttributionType.User) || (x.CreatorOrgId == _sessionContext.RequiredOrgId && x.AttributionType == ECommonAttributionType.Org )).ToListAsync();
+            return await _commonOpinionRepository.Queryable().Where(x => x.CommonType == commonType && (x.IsOpen == isOpen || (x.CreatorOrgId == _sessionContext.RequiredOrgId && x.AttributionType == ECommonAttributionType.Org)))
+                .WhereIF(isOpen == false, x => x.CreatorId == _sessionContext.RequiredUserId && x.AttributionType == ECommonAttributionType.User ).ToListAsync();
         }
 
         /// <summary>