| | |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-file-by-textualResearchAttach") |
| | | public R putFileByPrefixTextualResearchAttach(@RequestParam MultipartFile file,String resGuid) { |
| | | public R putFileByPrefixTextualResearchAttach(@RequestParam MultipartFile file,String resGuid,Integer type) { |
| | | BladeFile bladeFile = ossBuilder.templateByPrefixPath("textualResearchAttach").putFile(file.getOriginalFilename(), file.getInputStream()); |
| | | buildTextualResearchAttach(resGuid,bladeFile); |
| | | buildTextualResearchAttach(resGuid,bladeFile,type); |
| | | return R.data(bladeFile); |
| | | } |
| | | |
| | |
| | | * 保存考证附件上传数据 |
| | | * @param bladeFile |
| | | */ |
| | | private void buildTextualResearchAttach(String resGuid,BladeFile bladeFile) { |
| | | private void buildTextualResearchAttach(String resGuid,BladeFile bladeFile,Integer type) { |
| | | TextualResearchAttach attach = new TextualResearchAttach(); |
| | | attach.setResGuid(resGuid); |
| | | attach.setType(type); |
| | | attach.setPath(bladeFile.getName()); |
| | | attach.setName(bladeFile.getOriginalName()); |
| | | attach.setCreateTime(new Date()); |