| | |
| | | return ""; |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/delete/file/auth") |
| | | // @ManagerAuth |
| | | public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){ |
| | | planId="上传文件-20"; |
| | | String[] split = planId.split("-"); |
| | | int id = Integer.parseInt(split[1]); |
| | | System.out.println("---开始---"); |
| | | String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 指定保存文件的路径 |
| | | try{ |
| | | FileSaveExampleUtil.deleteFilesInDirectory(savePath); |
| | | }catch (Exception e){ |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | // @RequestMapping(value = "/plan/delete/file/auth") |
| | | //// @ManagerAuth |
| | | // public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){ |
| | | // planId="上传文件-20"; |
| | | // String[] split = planId.split("-"); |
| | | // int id = Integer.parseInt(split[1]); |
| | | // System.out.println("---开始---"); |
| | | // String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 指定保存文件的路径 |
| | | // try{ |
| | | // FileSaveExampleUtil.deleteFilesInDirectory(savePath); |
| | | // }catch (Exception e){ |
| | | // return R.error(); |
| | | // } |
| | | // return R.ok(); |
| | | // } |
| | | |
| | | @RequestMapping(value = "/plan/view/file/auth") |
| | | // @ManagerAuth |
| | |
| | | for (Plan plan : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", plan.getId()); |
| | | map.put("value", plan.getName()+"---"+plan.getId()); |
| | | // map.put("value", plan.getName()+"---"+plan.getId()); |
| | | map.put("value", plan.getName()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |