From a2e558007066daaa445032d600700096d5c90f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E6=96=87=E7=BF=94?= <878130837@qq.com> Date: Sat, 2 Mar 2024 14:46:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/TrackContents/TrackContentService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs index 97c1c0fc..67097d55 100644 --- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs +++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs @@ -203,14 +203,14 @@ namespace SJZY.Track.Application.Services.TrackContents { if (input.Options != OptionTypeNoNull.删除) { - if (input.TrackContentId == input.MapTrackContentId) throw new BusinessException(message: _stringLocalizer["IsTrackContentMapAny"]); + if (input.SubSystemId == input.MapSubSystemId) throw new BusinessException(message: _stringLocalizer["NotAllowedToMapSubSystem"]); Expression> isMapAnyExp = x => x.TrackContentId == input.TrackContentId && x.MapTrackContentId == input.MapTrackContentId; if (input.Options == OptionTypeNoNull.修改) isMapAnyExp.And(x => x.Id != input.Id); if (await _trackContentRepository.IsMapAnyAsync(isMapAnyExp)) - throw new BusinessException(message: _stringLocalizer["NotAllowedToMapOneself"]); + throw new BusinessException(message: _stringLocalizer["IsTrackContentMapAny"]); } switch (input.Options)