| | |
| | | filePath = filePath + "/show/" + file.getOriginalFilename().split("\\.", 2)[0]; |
| | | // 上传并返回新文件名称 |
| | | String fileName = FileUploadUtils.uploadSort(filePath, file); |
| | | //将word转成html |
| | | convertDocToHtml(filePath + "\\" + file.getOriginalFilename(), filePath + "\\" + file.getOriginalFilename().split("\\.", 2)[0] + ".html"); |
| | | // 将word转成html(源文件以磁盘实际保存路径为准,保持分隔符一致,避免"/"和"\"混用导致找不到文件) |
| | | String docFilePath = RuoYiConfig.getProfile() + fileName.replace(Constants.RESOURCE_PREFIX, ""); |
| | | String htmlFilePath = docFilePath.replaceAll("\\.[^.]*$", ".html"); |
| | | convertDocToHtml(docFilePath, htmlFilePath); |
| | | |
| | | String url = null; |
| | | SysConfig config = new SysConfig(); |
| | |
| | | */ |
| | | @ApiOperation("删除RedisCache") |
| | | @PostMapping("/deleteRedisCache") |
| | | public String deleteRedisCache(@RequestBody String key) { |
| | | String object = redisCache.getCacheObject(key); |
| | | if(StringUtils.isNotEmpty(object)) { |
| | | redisCache.deleteObject(key); |
| | | return "删除RedisCache" + key + "成功!"; |
| | | }else { |
| | | return "删除RedisCache" + key + "失败,未找到对应cache"; |
| | | public Set<String> deleteRedisCache(@RequestBody String key) { |
| | | Set<String> allKeys = redisCache.getAllKeys(); |
| | | Set<String> matchKeys = new HashSet<>(); |
| | | for (String redisKey : allKeys) { |
| | | if(redisKey.contains(key)) { |
| | | redisCache.deleteObject(redisKey); |
| | | matchKeys.add(redisKey); |
| | | } |
| | | } |
| | | return matchKeys; |
| | | } |
| | | } |
| | | |