Here are the examples of the java api org.springblade.core.mp.support.Condition.getPage() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
12 Examples
17
View Complete Implementation : TenantController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperation(value = "分页", notes = "传入tenant")
public R<IPage<Tenant>> page(Tenant tenant, Query query) {
IPage<Tenant> pages = tenantService.selectTenantPage(Condition.getPage(query), tenant);
return R.data(pages);
}
15
View Complete Implementation : NoticeController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), @ApiImplicitParam(name = "replacedle", value = "公告标题", paramType = "query", dataType = "string") })
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入notice")
public R<IPage<Notice>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.clreplaced));
return R.data(pages);
}
15
View Complete Implementation : NoticeController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), @ApiImplicitParam(name = "replacedle", value = "公告标题", paramType = "query", dataType = "string") })
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入notice")
public R<IPage<NoticeVO>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.clreplaced));
return R.data(NoticeWrapper.build().pageVO(pages));
}
15
View Complete Implementation : ParamController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "paramName", value = "参数名称", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "paramKey", value = "参数键名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "paramValue", value = "参数键值", paramType = "query", dataType = "string") })
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入param")
public R<IPage<Param>> list(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<Param> pages = paramService.page(Condition.getPage(query), Condition.getQueryWrapper(param, Param.clreplaced));
return R.data(pages);
}
15
View Complete Implementation : TenantController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "tenantId", value = "参数名称", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "tenantName", value = "角色别名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "contactNumber", value = "联系电话", paramType = "query", dataType = "string") })
@ApiOperation(value = "分页", notes = "传入tenant")
public R<IPage<Tenant>> list(@ApiIgnore @RequestParam Map<String, Object> tenant, Query query, BladeUser bladeUser) {
QueryWrapper<Tenant> queryWrapper = Condition.getQueryWrapper(tenant, Tenant.clreplaced);
IPage<Tenant> pages = tenantService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, bladeUser.getTenantId()) : queryWrapper);
return R.data(pages);
}
14
View Complete Implementation : CodeController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string") })
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入code")
public R<IPage<Code>> list(@ApiIgnore @RequestParam Map<String, Object> code, Query query) {
IPage<Code> pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.clreplaced));
return R.data(pages);
}
12
View Complete Implementation : DatasourceController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页 数据源配置表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入datasource")
public R<IPage<Datasource>> list(Datasource datasource, Query query) {
IPage<Datasource> pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource));
return R.data(pages);
}
12
View Complete Implementation : AuthClientController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入client")
public R<IPage<AuthClient>> list(AuthClient authClient, Query query) {
IPage<AuthClient> pages = clientService.page(Condition.getPage(query), Condition.getQueryWrapper(authClient));
return R.data(pages);
}
11
View Complete Implementation : LogApiController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 查询多条(分页)
*/
@GetMapping("/list")
public R<IPage<LogApiVo>> list(@ApiIgnore @RequestParam Map<String, Object> log, Query query) {
IPage<LogApi> pages = logService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(log, LogApi.clreplaced));
List<LogApiVo> records = pages.getRecords().stream().map(logApi -> {
LogApiVo vo = BeanUtil.copy(logApi, LogApiVo.clreplaced);
vo.setStrId(Func.toStr(logApi.getId()));
return vo;
}).collect(Collectors.toList());
IPage<LogApiVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal());
pageVo.setRecords(records);
return R.data(pageVo);
}
10
View Complete Implementation : LogUsualController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 查询多条(分页)
*/
@GetMapping("/list")
public R<IPage<LogUsualVo>> list(@ApiIgnore @RequestParam Map<String, Object> log, Query query) {
IPage<LogUsual> pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogUsual.clreplaced));
List<LogUsualVo> records = pages.getRecords().stream().map(logApi -> {
LogUsualVo vo = BeanUtil.copy(logApi, LogUsualVo.clreplaced);
vo.setStrId(Func.toStr(logApi.getId()));
return vo;
}).collect(Collectors.toList());
IPage<LogUsualVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal());
pageVo.setRecords(records);
return R.data(pageVo);
}
9
View Complete Implementation : LogErrorController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 查询多条(分页)
*/
@GetMapping("/list")
public R<IPage<LogErrorVo>> list(@ApiIgnore @RequestParam Map<String, Object> logError, Query query) {
IPage<LogError> pages = errorLogService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(logError, LogError.clreplaced));
List<LogErrorVo> records = pages.getRecords().stream().map(logApi -> {
LogErrorVo vo = BeanUtil.copy(logApi, LogErrorVo.clreplaced);
vo.setStrId(Func.toStr(logApi.getId()));
return vo;
}).collect(Collectors.toList());
IPage<LogErrorVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal());
pageVo.setRecords(records);
return R.data(pageVo);
}
9
View Complete Implementation : UserController.java
Copyright Apache License 2.0
Author : chillzhuang
Copyright Apache License 2.0
Author : chillzhuang
/**
* 用户列表
*/
@GetMapping("/list")
@ApiImplicitParams({ @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") })
@ApiOperationSupport(order = 3)
@ApiOperation(value = "列表", notes = "传入account和realName")
public R<IPage<UserVO>> list(@ApiIgnore @RequestParam Map<String, Object> user, Query query, BladeUser bladeUser) {
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.clreplaced);
IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper);
return R.data(UserWrapper.build().pageVO(pages));
}