예제 #1
0
 @RequestMapping(value = "/apply/list")
 public String applyList(ModelMap map, ShareModel model, HttpServletRequest req) {
   try {
     shareService.applyList(model);
     map.addAttribute("model", model);
     return V("apply_list");
   } catch (Exception e) {
     e.printStackTrace();
     return "error";
     // response.getWriter().write(FormatUtil.dwzError(e.getMessage()));
   }
 }
예제 #2
0
 @RequestMapping(value = "/apply/pass")
 public void applyPass(
     ModelMap map, ShareModel model, HttpServletRequest req, HttpServletResponse response)
     throws Exception {
   response.setCharacterEncoding("utf-8");
   try {
     shareService.applyPass(model);
     response
         .getWriter()
         .write(FormatUtil.dwzResult("题库申请已经通过!", "share_apply_list", "share/apply/list"));
   } catch (Exception e) {
     String info = "通过题库申请时出错:";
     Log.error(info, e);
     response.getWriter().write(FormatUtil.dwzError(info));
   }
 }