admin
2025-02-25 30d8e227e8d823b6c38c3b9c90ac2df03b63befe
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5HelpCenterController.java
@@ -76,16 +76,21 @@
                list.addAll(list1);
            if (list.size() == 0) {
                pageId = 0L;
            } else {
                pageId = list.get(list.size() - 1).getId();
                // 版本过滤
                int version = Integer.parseInt(acceptData.getVersion());
                String platform = acceptData.getPlatform().toLowerCase();
                List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem());
                if (versionList == null || versionList.size() <= 0) {
                    //降级
                    versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem());
                    if(versionList!=null&&versionList.size()>0) {
                        version = versionList.get(versionList.size() - 1).getVersionCode();
                        versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem());
                    }
                }
                if (versionList == null || versionList.size() <= 0) {
                    list.clear();
                } else {
@@ -177,6 +182,15 @@
            String platform = acceptData.getPlatform().toLowerCase();
            List<AppVersionInfo> versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem());
            if (versionList == null || versionList.size() <= 0) {
                //降级
                versionList = appVersionService.listByPlatformAndMaxVersionCode(platform, version, acceptData.getSystem());
                if(versionList!=null&&versionList.size()>0) {
                    version = versionList.get(versionList.size() - 1).getVersionCode();
                    versionList = appVersionService.listByPlatformAndMinVersionCode(platform, version, acceptData.getSystem());
                }
            }
            if (versionList == null || versionList.size() <= 0) {
                resultList.clear();
            } else {
                List<Long> sourceIdList = new ArrayList<>();
@@ -192,7 +206,6 @@
                for (int i = 0; i < list.size(); i++) {
                    if (!sets.contains(list.get(i).getId())) {
                        list.remove(i--);
                    }
                }
            }