/** * @Title: batchDelete @Description: Ajax批量逻辑删除 * * @param ids * @return JsonResult */ @RequestMapping(value = "/batchlogicdelete", method = RequestMethod.POST) public @ResponseBody JsonResult batchLogicDelete(String ids) { File entity = new File(); entity.getMap().put("ids", ids.split(",")); entity.setIs_delete(true); return fileService.modify(entity); }
/** * @Title: delete @Description: Ajax逻辑删除 * * @param id * @return JsonResult */ @RequestMapping(value = "/logicdelete", method = RequestMethod.POST) @ResponseBody public JsonResult logicDelete(Integer id) { File entity = new File(); entity.setId(id); entity.setIs_delete(true); return fileService.modify(entity); }
/** * @Title: recover @Description: Ajax恢复 * * @param id * @return JsonResult */ @RequestMapping(value = "/recover", method = RequestMethod.POST) @ResponseBody public JsonResult recover(Integer id) { File entity = new File(id, false); return fileService.modify(entity); }
/** * @Title: update @Description: Ajax保存修改文件名信息 * * @param entity * @return JsonResult */ @RequestMapping(value = "/updatename", method = RequestMethod.POST) public @ResponseBody JsonResult updateName(File entity) { entity.setName(entity.getName() + "." + entity.getExtension()); return fileService.modify(entity); }
/** * @Title: update @Description: Ajax保存修改信息 * * @param entity * @return JsonResult */ @RequestMapping(value = "/update", method = RequestMethod.POST) public @ResponseBody JsonResult update(File entity) { return fileService.modify(entity); }