diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs index dfd3d7dd..281fed37 100644 --- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs +++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs @@ -20,7 +20,7 @@ namespace SJZY.Track.Application.Services.TrackContents public TrackContentService( IStringLocalizer stringLocalizer, ITrackContentRepository trackContentRepository - + ) { this._stringLocalizer = stringLocalizer; @@ -111,10 +111,8 @@ namespace SJZY.Track.Application.Services.TrackContents { throw new BusinessException(message: _stringLocalizer["TrackContentExist"]); } - //更新的时候需要覆盖内容映射轨迹代码 - #endregion - + //更新的时候需要覆盖内容映射轨迹代码 var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id); ObjectMapper.Map(input, templateEntity); var isTrue = await _trackContentRepository.UpdateAsync(templateEntity); @@ -124,6 +122,9 @@ namespace SJZY.Track.Application.Services.TrackContents private async Task DeleteAsync(EditTrackContentInput input) { + #region 业务校验 + //需要加个判断,存在内容映射,则出提示 + #endregion var isTrue = await _trackContentRepository.SoftDeleteAsync(x => x.Id == input.Id); return new UnifyResultDto("200", "删除成功", isTrue);