fix:添加模版存在性校验
This commit is contained in:
parent
693dff47be
commit
bb57b8711a
@ -259,6 +259,11 @@ public class TrackTemplateService : ApplicationService
|
||||
#endregion 业务校验
|
||||
|
||||
var templateEntity = await _trackTemplateRepository.GetFirstAsync(a => a.Id == input.Id);
|
||||
if (templateEntity == null)
|
||||
{
|
||||
throw new BusinessException(message: "模版不存在");
|
||||
}
|
||||
|
||||
ObjectMapper.Map(input, templateEntity);
|
||||
var isTrue = await _trackTemplateRepository.UpdateAsync(templateEntity);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user