| | |
| | | String originName = file.getOriginalFilename(); |
| | | AtomicBoolean isVideo = new AtomicBoolean(false); |
| | | videoExtensionAllow.forEach(ext ->{ |
| | | if(ext.equalsIgnoreCase(originName)){ |
| | | String originNameLowerCase = originName.toLowerCase(); |
| | | if(originNameLowerCase.endsWith("." +ext)){ |
| | | isVideo.set(true); |
| | | } |
| | | }); |
| | |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = file.getInputStream(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService,null)).sheet().doRead(); |
| | | EasyExcel.read(inputStream, ComCvtServeExcelVO.class, new ComCvtServeExcelListen(communityService,null)) |
| | | .sheet().doRead(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | log.error("导入模板失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | return R.ok(); |
| | | } |