| | |
| | | |
| | | import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; |
| | | import com.vci.frameworkcore.pagemodel.SmRoleVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | |
| | | * @throws VciBaseException 查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/refDataGrid",method = RequestMethod.GET) |
| | | public BaseResult<SmRoleVO> refDataGrid(BaseQueryObject queryObject) throws VciBaseException { |
| | | if(queryObject == null){ |
| | | queryObject = new BaseQueryObject(); |
| | | public BaseResult<SmRoleVO> refDataGrid(BaseQueryObject queryObject) { |
| | | try { |
| | | if(queryObject == null){ |
| | | queryObject = new BaseQueryObject(); |
| | | } |
| | | DataGrid<SmRoleVO> roleVODataGrid = roleQueryService.refGridRoles(queryObject.getConditionMap(),queryObject.getPageHelper()); |
| | | return BaseResult.dataGrid(roleVODataGrid); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | log.error("查询角色列表时出现错误,原因:" + exceptionMessage); |
| | | return BaseResult.fail("查询角色列表时出现错误,原因" + exceptionMessage); |
| | | } |
| | | DataGrid<SmRoleVO> roleVODataGrid = roleQueryService.refGridRoles(queryObject.getConditionMap(),queryObject.getPageHelper()); |
| | | return BaseResult.dataGrid(roleVODataGrid); |
| | | //如果是老的项目,应该在refGridRoles上添加try,catch,然后catch里应该使用下面的代码 |
| | | //BaseResult.fail("这里返回前端的错误信息"); |
| | | } |
| | | |
| | | /** |
| | | * 角色的列表查询:用于下拉,还有列表等全查询场景 |
| | | * @param queryObject 查询对象,包含了查询条件,分页,排序等,即允许使用SmRoleVO里的所有属性作为查询条件 |
| | | * @return 包含三员的角色 的显示对象列表数据,请获取其中的data属性 |
| | | * @throws VciBaseException 查询出错的时候会抛出异常,如果是老的项目里不抛出异常 |
| | | */ |
| | | @RequestMapping(value = "/gridRoles",method = RequestMethod.GET) |
| | | //@VciUnCheckRight |
| | | public BaseResult<SmRoleVO> gridRoles(BaseQueryObject queryObject) { |
| | | try { |
| | | if(queryObject == null){ |
| | | queryObject = new BaseQueryObject(); |
| | | } |
| | | DataGrid<SmRoleVO> roleVOData = roleQueryService.gridRoles(queryObject.getConditionMap(),queryObject.getPageHelper()); |
| | | return BaseResult.dataGrid(roleVOData); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | log.error("查询角色列表时出现错误,原因:" + exceptionMessage); |
| | | return BaseResult.fail("查询角色列表时出现错误,原因:"+exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |