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<Role> page = commonService.findPage(Role.class, search);