예제 #1
0
 @GET
 @POST
 @Path("/new")
 public String doNew(Map<String, Object> model) {
   model.put("model", RoleCons.MODEL_NAME());
   model.put("openType", RoleCons.OPEN_TYPE());
   return RoleCons.NEW_ACTION_RESULT();
 }
예제 #2
0
 @POST
 @Path("/")
 @ShowValMess("dwzJson")
 public String doAdd(@QueryParam("role") Role role) {
   try {
     service.addRole(role);
     return RoleCons.DWZ_SUCCESS_JSON("添加角色信息成功");
   } catch (RoleException e) {
     return dwz.getFailedJson(e.getMessage()).toString();
   }
 }