guyue
2025-09-05 c9ab412c787f478d7689bb5c0aaad7478887a1b7
平台筛选2
1个文件已修改
33 ■■■■ 已修改文件
src/main/java/com/linghu/service/impl/PlatformServiceImpl.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/linghu/service/impl/PlatformServiceImpl.java
@@ -128,24 +128,23 @@
        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);
            }
    }