Browse Source

新增过滤条件以支持特定配置下的记录排除

在 `IPPBxController.cs` 中,`Hotline.Api.Controllers` 命名空间下,
新增了一条 `.WhereIF` 过滤条件:
- 当 `_appOptions.Value.IsLuZhou` 为 `true` 时,过滤掉
  `ActionType` 等于 `EActionType.CallEndArrange` 的记录。
- 该条件被插入到现有的 `.WhereIF` 链式调用中,
  紧接在 `dto.EndTime.HasValue` 的条件之后。

此修改旨在满足特定配置(如 `IsLuZhou` 为 `true`)下的
业务需求,排除特定类型的操作记录。
田爽 2 weeks ago
parent
commit
495a257df8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/Hotline.Api/Controllers/IPPbxController.cs

+ 1 - 0
src/Hotline.Api/Controllers/IPPbxController.cs

@@ -920,6 +920,7 @@ namespace Hotline.Api.Controllers
                 .WhereIF(string.IsNullOrEmpty(dto.UserName) == false, x => x.UserName.Contains(dto.UserName))
                 .WhereIF(dto.StartTime.HasValue, x => x.CreationTime >= dto.StartTime)
                 .WhereIF(dto.EndTime.HasValue, x => x.CreationTime <= dto.EndTime)
+                .WhereIF(_appOptions.Value.IsLuZhou,x=>x.ActionType != EActionType.CallEndArrange)
                 .OrderByDescending(x => x.CreationTime)
                 .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
             return new PagedDto<TelActionListRep>(total, _mapper.Map<IReadOnlyList<TelActionListRep>>(items));