diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushContentInput.cs index ec85498a..62fa7cda 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushContentInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackPush/EditTrackPushContentInput.cs @@ -34,6 +34,11 @@ public class EditTrackPushContentInput /// public int TrackContentId { get; set; } + /// + /// 可交换顺序的轨迹内容id + /// + public int? SwapTrackContentId { get; set; } + /// /// 轨迹内容参数值 /// diff --git a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs index e506cc3f..5225e8db 100644 --- a/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs +++ b/src/SJZY.Track.Application/Services/TrackPush/TrackPushService.cs @@ -5,9 +5,7 @@ using SJZY.Expand.ABP.Core.PublicMethords; using SJZY.Track.Application.Contract.Dtos.TrackPush; using SJZY.Track.Application.Contract.Services; using SJZY.Track.Application.Localization; -using SJZY.Track.Domain.Aggregates.TrackPullAggregate; using SJZY.Track.Domain.Aggregates.TrackPushAggregate; -using SJZY.Track.Domain.Aggregates.TrackTemplateAggregate; using SJZY.Track.Domain.Dtos.Common; using SJZY.Track.Domain.Dtos.TrackPush; @@ -22,19 +20,15 @@ public class TrackPushService : ApplicationService { private readonly IStringLocalizer _stringLocalizer; private readonly ITrackPushConfigRepository _trackPushConfigRepository; - private readonly ITrackPullConfigRepository _trackPullConfigRepository; private readonly ITrackPushCacheService _trackPushCacheService; public TrackPushService( IStringLocalizer stringLocalizer, ITrackPushConfigRepository trackPushConfigRepository, - ITrackTemplateRepository trackTemplateRepository, - ITrackPullConfigRepository trackPullConfigRepository, ITrackPushCacheService trackPushCacheService) { _stringLocalizer = stringLocalizer; _trackPushConfigRepository = trackPushConfigRepository; - _trackPullConfigRepository = trackPullConfigRepository; _trackPushCacheService = trackPushCacheService; } @@ -160,21 +154,21 @@ public class TrackPushService : ApplicationService if (await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => x.TrackContentId == input.TrackContentId))) throw new BusinessException(message: _stringLocalizer["IsTrackPushContentAny"]); - else if (!input.TrackContentCodeValue.IsNullOrWhiteSpace() && - await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => - x.TrackContentCodeValue == input.TrackContentCodeValue))) + if (!input.TrackContentCodeValue.IsNullOrWhiteSpace() && + await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => + x.TrackContentCodeValue == input.TrackContentCodeValue))) throw new BusinessException(message: _stringLocalizer["IsTrackPushContentCodeValueAny"]); - else if (!input.TrackStatusValue.IsNullOrWhiteSpace() && - await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => - x.TrackStatusValue == input.TrackStatusValue))) + if (!input.TrackStatusValue.IsNullOrWhiteSpace() && + await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => + x.TrackStatusValue == input.TrackStatusValue))) throw new BusinessException(message: _stringLocalizer["IsTrackPushContentStatusValueAny"]); - else if (!input.TrackContentValue.IsNullOrWhiteSpace() && - await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => - x.TrackContentValue == input.TrackContentValue))) + if (!input.TrackContentValue.IsNullOrWhiteSpace() && + await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => + x.TrackContentValue == input.TrackContentValue))) throw new BusinessException(message: _stringLocalizer["IsTrackPushContentValueAny"]); - else if (!input.TrackEnContentValue.IsNullOrWhiteSpace() && - await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => - x.TrackEnContentValue == input.TrackEnContentValue))) + if (!input.TrackEnContentValue.IsNullOrWhiteSpace() && + await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x => + x.TrackEnContentValue == input.TrackEnContentValue))) throw new BusinessException(message: _stringLocalizer["IsTrackPushEnContentValueAny"]); }