签约申请文件上传接口优化;

This commit is contained in:
mengkuiliang 2023-10-13 09:09:29 +08:00
parent 87cd158270
commit 25bcc18232
2 changed files with 8 additions and 0 deletions

View File

@ -113,6 +113,8 @@ public class ResidentSignApplyController extends BaseController {
FileUploadBody body = new FileUploadBody();
body.setOriginalFilename(file.getOriginalFilename());
body.setCode("1001");
body.setContentType(file.getContentType());
body.setSuffix(body.getOriginalFilename().substring(body.getOriginalFilename().lastIndexOf(".") + 1));
body.setFile(Base64.getEncoder().encodeToString(file.getBytes()));
// 上传家医
JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/resident/signinfo/uploadBase64", null, JSONObject.parseObject(JSONObject.toJSONString(body)));

View File

@ -24,4 +24,10 @@ public class FileUploadBody {
@ApiModelProperty("文件名称")
private String originalFilename;
@ApiModelProperty("文件类型")
private String contentType;
@ApiModelProperty("文件后缀")
private String suffix;
}