public virtual async Task UpdateJobUrgentAsync(JobUrgentEditDto input) { //TODO:更新前的逻辑判断,是否允许更新 var entity = await _jobUrgentRepository.GetAsync(input.Id.Value); input.MapTo(entity); await _jobUrgentRepository.UpdateAsync(entity); }
public virtual async Task <JobUrgentEditDto> CreateJobUrgentAsync(JobUrgentEditDto input) { //TODO:新增前的逻辑判断,是否允许新增 var entity = input.MapTo <JobUrgent>(); //entity.UrgentDate = DateTime.Now; //entity.UrgentLength = 30; //entity.State = 1; //entity.isDelete = false; entity.Weight = Convert.ToInt32(entity.UrgentType); entity = await _jobUrgentRepository.InsertAsync(entity); return(entity.MapTo <JobUrgentEditDto>()); }