Merge remote-tracking branch 'origin/S02-轨迹中台第二部分' into test

This commit is contained in:
dingenwen 2024-03-28 11:28:02 +08:00
commit bbf9755c24

View File

@ -51,19 +51,19 @@ public class TrackPullCacheService : ApplicationService, ITrackPullCacheService
public async Task<TrackPullParamWithContentConfigDto?> SetPullConfigAsync(int? id = null, int? subSystemId = null,
int? serviceProviderId = null)
{
var data = new TrackPullParamWithContentConfigDto();
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;
if (trackPullConfigEntity == null) return null;
var trackPullConfigDetail = await _trackPullConfigRepository.GetDetailAsync(trackPullConfigEntity.Id);
var trackPullContentList = await _trackPullConfigRepository.GetContentListCacheAsync(trackPullConfigEntity.Id);
if (trackPullContentList.Count == 0) return data;
if (trackPullContentList.Count == 0) return null;
var data = new TrackPullParamWithContentConfigDto();
data.ParamConfig =
ObjectMapper.Map<GetTrackPullConfigDetailOutputVO, TrackPullParamConfigDto>(trackPullConfigDetail);