public override async Task <ResponseStatusList> UpdateList(CreateOrUpdateListInputDto <FaceDto> input) { ResponseStatusList result = new ResponseStatusList(); foreach (var item in input.List) { var dto = await base.UpdateAsync(item); result.ResponseStatusObject.Add(new ResponseStatus { Id = dto.Id.ToString(), RequestURL = "", StatusCode = 0, StatusString = "", LocalTime = DateTime.Now }); } return(result); }
public override async Task <ResponseStatusList> CreateList(CreateOrUpdateListInputDto <FaceDto> input) { ResponseStatusList result = new ResponseStatusList(); foreach (var faceDto in input.List) { foreach (var subImageInfoDto in faceDto.SubImageList.SubImageInfoObject) { if (string.IsNullOrEmpty(subImageInfoDto.Data)) { continue; } SaveImageByBase64Request request = new SaveImageByBase64Request() { ImageBase64 = subImageInfoDto.Data }; SaveImageResponse response = await _imageAppService.SaveImageByBase64Async(request); subImageInfoDto.NodeId = response.BucketName; subImageInfoDto.ImageKey = response.ImageName; subImageInfoDto.StoragePath = $"{response.BucketName}:{response.ImageName}"; } var face = await base.CreateAsync(faceDto); result.ResponseStatusObject.Add(new ResponseStatus { Id = face.Id.ToString(), RequestURL = "", StatusCode = 0, StatusString = "", LocalTime = DateTime.Now }); } return(result); }