Merge pull request '修改' (#30) from S01-轨迹中台 into test
Reviewed-on: http://192.168.80.50:3000/Dotnet/SJZY.Track.Api/pulls/30
This commit is contained in:
commit
d6ec50cbc8
@ -213,7 +213,10 @@ public class TrackPullService : ApplicationService, ITransientDependency
|
||||
Expression<Func<TrackPullContentConfigEntity, bool>> isContentAnyExp = x => x.Id != input.Id && x.TrackPullConfigId == input.TrackPullConfigId;
|
||||
|
||||
var trackKeywordExp = Expressionable.Create<TrackPullContentConfigEntity>()
|
||||
.And(x => x.TrackContentId == input.TrackContentId || x.TrackContentCodeValue == input.TrackContentCodeValue || x.TrackStatusValue == input.TrackStatusValue || x.TrackContentValue == input.TrackContentValue);
|
||||
.And(x => x.TrackContentId == input.TrackContentId
|
||||
|| (input.TrackContentCodeValue != null && x.TrackContentCodeValue == input.TrackContentCodeValue)
|
||||
|| (input.TrackStatusValue != null && x.TrackStatusValue == input.TrackStatusValue)
|
||||
|| (input.TrackContentValue != null && x.TrackContentValue == input.TrackContentValue));
|
||||
|
||||
input.TrackKeywords?.ForEach(item => { trackKeywordExp.Or(x => SqlFunc.SplitIn(x.TrackKeyword, item)); });
|
||||
|
||||
|
||||
@ -199,7 +199,12 @@ public class TrackPushService : ApplicationService, ITransientDependency
|
||||
if (input.Options != OptionTypeNoNull.删除)
|
||||
{
|
||||
Expression<Func<TrackPushContentConfigEntity, bool>> isContentAnyExp = x =>
|
||||
x.TrackPushConfigId == input.TrackPushConfigId && (x.TrackContentId == input.TrackContentId || x.TrackContentCodeValue == input.TrackContentCodeValue || x.TrackStatusValue == x.TrackStatusValue || x.TrackContentValue == input.TrackContentValue || x.TrackEnContentValue == input.TrackEnContentValue);
|
||||
x.TrackPushConfigId == input.TrackPushConfigId
|
||||
&& (x.TrackContentId == input.TrackContentId
|
||||
|| (input.TrackContentCodeValue != null && x.TrackContentCodeValue == input.TrackContentCodeValue)
|
||||
|| (input.TrackStatusValue != null && x.TrackStatusValue == x.TrackStatusValue)
|
||||
|| (input.TrackContentValue != null && x.TrackContentValue == input.TrackContentValue)
|
||||
|| (input.TrackEnContentValue != null && x.TrackEnContentValue == input.TrackEnContentValue));
|
||||
if (input.Options == OptionTypeNoNull.修改) isContentAnyExp = isContentAnyExp.And(x => x.Id != input.Id);
|
||||
|
||||
if (await _trackPushConfigRepository.IsContentAnyAsync(isContentAnyExp))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user