@Action(value = "/remark/getRemarkInfo")
 public String getAllRemarkInfo() {
   result = new JSONObject();
   array = new JSONArray();
   List<RemarkInfo> reinfos = remarkInfoService.getAllRemarkInfo();
   Entity2JSONUtil.RemarkInfo2JSON(reinfos, array);
   result.put("total", reinfos.size());
   result.put("rows", array);
   return "json";
 }
示例#2
0
 /*
  * 获取角色菜单
  */
 @Action(
     value = "/role/getUserRole",
     results = {
       @Result(
           name = "array",
           type = "json",
           params = {"root", "array"})
     })
 public String getUserRoles() {
   array = new JSONArray();
   List<Role> roles = roleService.findAllListForBox((byte) -1);
   Entity2JSONUtil.role2JSON1(roles, array);
   return "array";
 }
示例#3
0
 /*
  * 管理员查看所有角色
  */
 @Action(value = "/role/getAllRole")
 public String getAllRoles() {
   result = new JSONObject();
   if (page == null) page = 1 + "";
   if (rows == null) rows = 20 + "";
   List<Role> roles =
       roleService.pageList(
           (Integer.parseInt(page) - 1) * Integer.parseInt(rows), Integer.parseInt(rows), -1);
   JSONArray array = new JSONArray();
   Entity2JSONUtil.role2JSON(roles, array);
   result.put("total", roleService.count(-1));
   result.put("rows", array);
   return "json";
 }