class DatabaseSetController {

    @RequestMapping(value = "/list", method = RequestMethod.POST)
    public ServiceResult<ListResult<DatabaseSetView>> loadPageList(@RequestBody Paging<DatabaseSet> paging, @CurrentUser LoginUser user) throws SQLException {
        if (StringUtils.isNotBlank(paging.getData().getApp_id())) {
            if (permissionService.isManagerById(user.getId())) {
                return ServiceResult.success(databaseSetService.findDbSetPageListByAppid(paging));
            } else {
                return ServiceResult.success(ListResult.builder().list(ListUtils.EMPTY_LIST).build());
            }
        }
        return ServiceResult.success(databaseSetService.findDbSetPageList(paging));
    }

}