fix:查询到已经删除的拉取配置

This commit is contained in:
xiaolipro 2024-09-25 15:09:11 +08:00
parent 05573fd12d
commit fe23c41c13

View File

@ -15,12 +15,9 @@ public class TrackPullConfigRepository : BasicRepository<TrackPullConfigEntity>,
{ {
public async Task<UnifyPageResultDto<GetTrackPullConfigPageOutputVO>> GetPageAsync(KeywordsInputVO input) public async Task<UnifyPageResultDto<GetTrackPullConfigPageOutputVO>> GetPageAsync(KeywordsInputVO input)
{ {
return await AsQueryable() return await Context.Queryable<TrackPullConfigEntity>()
.LeftJoin<VSystemEntity>((trackPull, system) => trackPull.SubSystemId == system.Id && !system.IsDeleted) .LeftJoin<VSystemEntity>((trackPull, system) => trackPull.SubSystemId == system.Id)
.LeftJoin<VServiceProviderEntity>((trackPull, system, service) => .LeftJoin<VServiceProviderEntity>((trackPull, system, service) => trackPull.ServiceProviderId == service.Id)
trackPull.ServiceProviderId == service.Id && !service.IsDeleted)
.Filter(null, true)
.Where(trackPull => !trackPull.IsDeleted)
.WhereIF(input.SubSystemId.HasValue, trackPull => trackPull.SubSystemId == input.SubSystemId) .WhereIF(input.SubSystemId.HasValue, trackPull => trackPull.SubSystemId == input.SubSystemId)
.WhereIF(!input.Keywords.IsNullOrWhiteSpace(), .WhereIF(!input.Keywords.IsNullOrWhiteSpace(),
(trackPull, system, service) => service.Name.Contains(input.Keywords!)) (trackPull, system, service) => service.Name.Contains(input.Keywords!))