Esempio n. 1
0
 @AccessMenu
 @AccessPagination(custom = true, async = AccessPagination.ASYNC.ASYNC_NO)
 @RequestMapping(value = "/index")
 public String list(HttpServletRequest request) {
   request.setAttribute("pagination", helpService.pagination());
   return "/help/help_list";
 }
Esempio n. 2
0
 @ResponseBody
 @RequestMapping("/hidden.do")
 public Object hidden(@RequestParam Integer id, HttpServletRequest request) {
   try {
     helpService.hidden(id);
     return new ResponseObject(true);
   } catch (Exception e) {
     logger.error("目录隐藏异常", e);
     return new ResponseObject(false, "目录隐藏异常");
   }
 }
Esempio n. 3
0
 @ResponseBody
 @RequestMapping("/save.do")
 public Object save(Help help) {
   try {
     if (help.getCateId() == null) {
       return new ResponseObject(false, "请选择目录分类");
     }
     if (help.getTitle().isEmpty()) {
       return new ResponseObject(false, "请输入帮助标题");
     }
     if (help.getContent().isEmpty()) {
       return new ResponseObject(false, "请输入帮助内容");
     }
     helpService.saveOrUpdate(help);
     return new ResponseObject(true, "保存成功");
   } catch (Exception e) {
     logger.error("保存帮助异常", e);
     return new ResponseObject(false, "保存异常");
   }
 }