| | |
| | | return R.ok(wrapper.eq(RecoveryServe::getIsDelete, 0) |
| | | .orderByDesc(RecoveryServe::getCreateTime).page(Page.of(pageNum, pageSize))); |
| | | } |
| | | @ApiOperation(value = "服务名称下拉列表", tags = {"后台-订单管理-服务名称下拉列表"}) |
| | | @GetMapping(value = "/pageList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "服务名称", name = "serveName", dataType = "String"), |
| | | @ApiImplicitParam(value = "回收价格起点", name = "startPrice", dataType = "String"), |
| | | @ApiImplicitParam(value = "回收价格终点", name = "endPrice", dataType = "String"), |
| | | @ApiImplicitParam(value = "页码", name = "pageNum", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(value = "每页条数", name = "pageSize", dataType = "Integer", required = true) |
| | | }) |
| | | public R<IPage<RecoveryServe>> pageList(String serveName, String startPrice, String endPrice, |
| | | @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | LambdaQueryChainWrapper<RecoveryServe> wrapper = recoveryServeService.lambdaQuery(); |
| | | wrapper.orderByDesc(RecoveryServe::getSort); |
| | | // 服务名称模糊匹配 |
| | | wrapper = StringUtils.isNotBlank(serveName) ? wrapper.like(RecoveryServe::getServeName, serveName) : wrapper; |
| | | // 回收价格区间匹配 |
| | | wrapper = null != startPrice ? wrapper.ge(RecoveryServe::getDefaultPrice, startPrice) : wrapper; |
| | | wrapper = null != endPrice ? wrapper.le(RecoveryServe::getDefaultPrice, endPrice) : wrapper; |
| | | return R.ok(wrapper.eq(RecoveryServe::getIsDelete, 0) |
| | | .page(Page.of(pageNum, pageSize))); |
| | | } |
| | | |
| | | /** |
| | | * 回收服务列表 |