/// <summary> /// 编辑职位用户表 /// </summary> public virtual async Task UpdateJobPersonAsync(JobPersonEditDto input) { //TODO:更新前的逻辑判断,是否允许更新 var entity = await _jobPersonRepository.GetAsync(input.Id.Value); input.MapTo(entity); await _jobPersonRepository.UpdateAsync(entity); }
/// <summary> /// 新增职位用户表 /// </summary> public virtual async Task <JobPersonEditDto> CreateJobPersonAsync(JobPersonEditDto input) { //TODO:新增前的逻辑判断,是否允许新增 var entity = input.MapTo <JobPerson>(); entity = await _jobPersonRepository.InsertAsync(entity); return(entity.MapTo <JobPersonEditDto>()); }