feature:【轨迹推送支持顺序互换】
https://www.tapd.cn/60863849/prong/stories/view/1160863849001017011
This commit is contained in:
parent
a58b9e264a
commit
3ebbe620af
@ -34,6 +34,11 @@ public class EditTrackPushContentInput
|
||||
/// </summary>
|
||||
public int TrackContentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 可交换顺序的轨迹内容id
|
||||
/// </summary>
|
||||
public int? SwapTrackContentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 轨迹内容参数值
|
||||
/// </summary>
|
||||
|
||||
@ -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<TrackLocalizationResource> _stringLocalizer;
|
||||
private readonly ITrackPushConfigRepository _trackPushConfigRepository;
|
||||
private readonly ITrackPullConfigRepository _trackPullConfigRepository;
|
||||
private readonly ITrackPushCacheService _trackPushCacheService;
|
||||
|
||||
public TrackPushService(
|
||||
IStringLocalizer<TrackLocalizationResource> stringLocalizer,
|
||||
ITrackPushConfigRepository trackPushConfigRepository,
|
||||
ITrackTemplateRepository trackTemplateRepository,
|
||||
ITrackPullConfigRepository trackPullConfigRepository,
|
||||
ITrackPushCacheService trackPushCacheService)
|
||||
{
|
||||
_stringLocalizer = stringLocalizer;
|
||||
_trackPushConfigRepository = trackPushConfigRepository;
|
||||
_trackPullConfigRepository = trackPullConfigRepository;
|
||||
_trackPushCacheService = trackPushCacheService;
|
||||
}
|
||||
|
||||
@ -160,19 +154,19 @@ 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() &&
|
||||
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() &&
|
||||
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() &&
|
||||
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() &&
|
||||
if (!input.TrackEnContentValue.IsNullOrWhiteSpace() &&
|
||||
await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp.And(x =>
|
||||
x.TrackEnContentValue == input.TrackEnContentValue)))
|
||||
throw new BusinessException(message: _stringLocalizer["IsTrackPushEnContentValueAny"]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user