Commit 7125a159 authored by xuxin's avatar xuxin

平台选项增加排序字段

parent e67462c4
...@@ -19,5 +19,7 @@ public class PlatformOptions { ...@@ -19,5 +19,7 @@ public class PlatformOptions {
private String platform; private String platform;
private int weight;
private Map<String, String> subPlatform; private Map<String, String> subPlatform;
} }
...@@ -767,6 +767,7 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -767,6 +767,7 @@ public class IpResourceServiceImpl implements IpResourceService {
public List<PlatformOptions> getPlatformOptions() { public List<PlatformOptions> getPlatformOptions() {
try { try {
List<PlatformOptions> platformOptions = platformOptionsRepository.findAll(); List<PlatformOptions> platformOptions = platformOptionsRepository.findAll();
Collections.sort(platformOptions, Comparator.comparing(PlatformOptions::getWeight).reversed());
return platformOptions; return platformOptions;
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment