|
@@ -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>
|