修改拉取缓存设置

This commit is contained in:
柳文翔 2024-03-14 09:21:22 +08:00
parent 1718ede2ee
commit 6a6e46482a

View File

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