Пример #1
0
 /**
  * @Title: update @Description: 进入修改页面
  *
  * @param id
  * @param directory_id 文件夹id
  * @param model
  * @return String
  */
 @RequestMapping("/update")
 public String update(Integer id, Integer directory_id, Model model) {
   File entity = fileService.findById(id);
   model.addAttribute("model", entity);
   model.addAttribute("directory_id", directory_id);
   return getPathUpdate();
 }
Пример #2
0
 /**
  * @Description 根据指定文件id下载文件
  *
  * @param id
  * @param request
  * @param response void
  */
 @RequestMapping("/download")
 public void download(Integer id, HttpServletRequest request, HttpServletResponse response) {
   File entity = fileService.findById(id);
   if (entity != null) {
     FileDownload download = new FileDownload(request, response);
     download.process(entity.getUrl(), entity.getName());
   }
 }
Пример #3
0
  /**
   * @Title: update @Description: 进入修改文件名页面
   *
   * @param id
   * @param model
   * @return String
   */
  @RequestMapping("/updatename")
  public String updateName(Integer id, Model model) {
    File entity = fileService.findById(id);
    model.addAttribute("model", entity);
    model.addAttribute("file_name", entity.gainFileNameWithoutExt());

    return getPath("updatename");
  }
Пример #4
0
 /**
  * @Description 进入详情页面
  *
  * @param id
  * @param model
  * @return String
  * @author davidwan
  */
 @RequestMapping("/view")
 public String view(Integer id, Model model) {
   File entity = fileService.findById(id);
   model.addAttribute("model", entity);
   return getPathView();
 }