| | |
| | | if (!platForm.isEmpty()){ |
| | | queryWrapper.in(Platform::getPlatform_id, platForm); |
| | | } |
| | | if (page != null && pageSize != null && type_id == null){ |
| | | Page<Platform> pageInfo = new Page<>(page, pageSize); |
| | | Page<Platform> result = this.page(pageInfo, queryWrapper); |
| | | return ResponseResult.success(new CustomPage<>(result)); |
| | | } else if (page != null && pageSize != null && type_id != null) { |
| | | Page<Platform> pageInfo = new Page<>(page, pageSize); |
| | | queryWrapper.eq(Platform::getType_id, type_id); |
| | | Page<Platform> result = this.page(pageInfo, queryWrapper); |
| | | return ResponseResult.success(new CustomPage<>(result)); |
| | | if (page != null && pageSize != null && type_id == null){ |
| | | Page<Platform> pageInfo = new Page<>(page, pageSize); |
| | | Page<Platform> result = this.page(pageInfo, queryWrapper); |
| | | return ResponseResult.success(new CustomPage<>(result)); |
| | | } else if (page != null && pageSize != null && type_id != null) { |
| | | Page<Platform> pageInfo = new Page<>(page, pageSize); |
| | | queryWrapper.eq(Platform::getType_id, type_id); |
| | | Page<Platform> result = this.page(pageInfo, queryWrapper); |
| | | return ResponseResult.success(new CustomPage<>(result)); |
| | | |
| | | } else { |
| | | CustomPage<Platform> customPage = new CustomPage<>(new Page<>()); |
| | | customPage.setRecords(new ArrayList<>()); |
| | | customPage.setTotal(0); |
| | | return ResponseResult.success(customPage); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | CustomPage<Platform> customPage = new CustomPage<>(new Page<>()); |
| | | List<Platform> list = this.list(queryWrapper); |
| | | customPage.setRecords(list); |
| | | customPage.setTotal(list.size()); |
| | | return ResponseResult.success(customPage); |
| | | } |
| | | |
| | | |
| | | } |