public async Task <ListResultDto <UserListDto> > GetUsers() { var deviceId = AbpSession.GetDeviceId(); var users = await _userRepository.GetAllListAsync(); return(new ListResultDto <UserListDto>( users.MapTo <List <UserListDto> >() )); }
public async Task <ForensicsRecordForEdit> CreateAsync(ForensicsRecordForEdit input) { //TODO: 新增前的逻辑判断,是否允许新增 var entity = input.ForensicsRecordEditDto.MapTo <ForensicsRecord>(); entity.DeviceId = AbpSession.GetDeviceId().Value; entity = await _forensicsRecordRepository.InsertAsync(entity); return(new ForensicsRecordForEdit { ForensicsRecordEditDto = entity.MapTo <ForensicsRecordEditDto>() }); }
/// <summary> /// 修改模式 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task UpdateStatusAsymc(DeviceStatusEditInput input) { var device = await _deviceRepository.GetAsync(AbpSession.GetDeviceId().Value); device.Status = input.Status; }