@RequestMapping(value = "/api/courseSession/priv/{sid}", method = RequestMethod.GET) public @ResponseBody HashMap<String, Object> courseSessionPriv( HttpServletRequest req, @PathVariable("sid") int sid) { HashMap<String, Object> h = new HashMap<String, Object>(); int uid = Integer.parseInt((String) req.getAttribute("uid")); try { h.put("code", 0); h.put("lecturer", csService.islecturer(uid, sid)); } catch (Exception e) { logger.info(e.toString()); h.put("code", 2); h.put("msg", "操作中发生异常!"); } return h; }