@RequestMapping(value = "/getFile/{Id}", method = RequestMethod.POST) public void upload(@PathVariable int Id, HttpServletResponse response) { ContractAttachment contractAttachment = iContractAttachmentService.loadByEntityId(Id); iFileProviderController.getFile(contractAttachment.getFileCode(), response); }
@RequestMapping(value = "/save", method = RequestMethod.POST) public void save(@RequestBody ContractAttachment contractAttachment) { iContractAttachmentService.save(contractAttachment); iFileProviderService.confirmFileProvider(contractAttachment.getFileCode()); }