Merge pull request '修改错误' (#59) from S02-轨迹中台 into dev

Reviewed-on: http://192.168.80.50:3000/Dotnet/SJZY.Track.Api/pulls/59
This commit is contained in:
liuwenxiang 2024-03-12 10:11:31 +08:00
commit 9fbd2d645c

View File

@ -34,7 +34,9 @@ public class TrackPullCacheService : ApplicationService, ITrackPullCacheService,
{
var data = new TrackPullConfigDto();
Expression<Func<TrackPullConfigEntity, bool>> exp = x => id.HasValue ? x.Id == id : x.SubSystemId == subSystemId && x.ServiceProviderId == serviceProviderId;
Expression<Func<TrackPullConfigEntity, bool>> exp = x =>
(!id.HasValue || x.Id == id) && (id.HasValue || (x.SubSystemId == subSystemId && x.ServiceProviderId == serviceProviderId));
var trackPullConfigEntity = await _trackPullConfigRepository.GetFirstAsync(exp);
if (trackPullConfigEntity == null) return data;