コード例 #1
0
ファイル: UserSetHandler.java プロジェクト: iisihub/CAP
 @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);
 }
コード例 #2
0
ファイル: UserSetHandler.java プロジェクト: iisihub/CAP
 @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);
   }
 }
コード例 #3
0
ファイル: UserSetHandler.java プロジェクト: iisihub/CAP
 @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);
 }