Exemple #1
0
 @HandlerType(HandlerTypeEnum.GRID)
 public BeanGridResult queryAllUserStatus(SearchSetting search, Request params) {
   search.addOrderBy("codeValue", false);
   search.addSearchModeParameters(SearchMode.EQUALS, "codeType", "userStatus");
   search.addSearchModeParameters(
       SearchMode.EQUALS,
       "locale",
       ((Locale) SimpleContextHolder.get(CapWebUtil.localeKey)).toString());
   Page<CodeType> page = commonService.findPage(CodeType.class, search);
   return new BeanGridResult(page.getContent(), page.getTotalRow(), null);
 }
Exemple #2
0
 @SuppressWarnings("rawtypes")
 @HandlerType(HandlerTypeEnum.GRID)
 public GridResult findRole(SearchSetting search, Request params) {
   String type = params.get("type");
   if ("modify".equalsIgnoreCase(type)) {
     List<Map<String, Object>> roleList = null;
     String userCode = params.get("userCode");
     roleList = roleSetService.findAllRoleWithSelectedByUserCode(userCode);
     MapGridResult gridResult = new MapGridResult();
     if (!CollectionUtils.isEmpty(roleList)) {
       gridResult.setRowData(roleList);
     }
     return gridResult;
   } else {
     search.addOrderBy("code", false);
     Page<DefaultRole> page = commonService.findPage(DefaultRole.class, search);
     return new BeanGridResult(page.getContent(), page.getTotalRow(), null);
   }
 }
Exemple #3
0
 @HandlerType(HandlerTypeEnum.GRID)
 public BeanGridResult queryAllRole(SearchSetting search, Request params) {
   search.addOrderBy("code", false);
   Page<DefaultRole> page = commonService.findPage(DefaultRole.class, search);
   return new BeanGridResult(page.getContent(), page.getTotalRow(), null);
 }