添加注释
This commit is contained in:
parent
56875e923a
commit
61cc6aafc5
@ -20,7 +20,7 @@ namespace SJZY.Track.Application.Services.TrackContents
|
|||||||
public TrackContentService(
|
public TrackContentService(
|
||||||
IStringLocalizer<TrackLocalizationResource> stringLocalizer,
|
IStringLocalizer<TrackLocalizationResource> stringLocalizer,
|
||||||
ITrackContentRepository trackContentRepository
|
ITrackContentRepository trackContentRepository
|
||||||
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this._stringLocalizer = stringLocalizer;
|
this._stringLocalizer = stringLocalizer;
|
||||||
@ -111,10 +111,8 @@ namespace SJZY.Track.Application.Services.TrackContents
|
|||||||
{
|
{
|
||||||
throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
|
throw new BusinessException(message: _stringLocalizer["TrackContentExist"]);
|
||||||
}
|
}
|
||||||
//更新的时候需要覆盖内容映射轨迹代码
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
//更新的时候需要覆盖内容映射轨迹代码
|
||||||
var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
|
var templateEntity = await _trackContentRepository.GetFirstAsync(a => a.Id == input.Id);
|
||||||
ObjectMapper.Map(input, templateEntity);
|
ObjectMapper.Map(input, templateEntity);
|
||||||
var isTrue = await _trackContentRepository.UpdateAsync(templateEntity);
|
var isTrue = await _trackContentRepository.UpdateAsync(templateEntity);
|
||||||
@ -124,6 +122,9 @@ namespace SJZY.Track.Application.Services.TrackContents
|
|||||||
|
|
||||||
private async Task<UnifyResultDto> DeleteAsync(EditTrackContentInput input)
|
private async Task<UnifyResultDto> DeleteAsync(EditTrackContentInput input)
|
||||||
{
|
{
|
||||||
|
#region 业务校验
|
||||||
|
//需要加个判断,存在内容映射,则出提示
|
||||||
|
#endregion
|
||||||
var isTrue = await _trackContentRepository.SoftDeleteAsync(x => x.Id == input.Id);
|
var isTrue = await _trackContentRepository.SoftDeleteAsync(x => x.Id == input.Id);
|
||||||
|
|
||||||
return new UnifyResultDto("200", "删除成功", isTrue);
|
return new UnifyResultDto("200", "删除成功", isTrue);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user