Commit 7125a159 authored by xuxin's avatar xuxin

平台选项增加排序字段

parent e67462c4
......@@ -19,5 +19,7 @@ public class PlatformOptions {
private String platform;
private int weight;
private Map<String, String> subPlatform;
}
......@@ -767,6 +767,7 @@ public class IpResourceServiceImpl implements IpResourceService {
public List<PlatformOptions> getPlatformOptions() {
try {
List<PlatformOptions> platformOptions = platformOptionsRepository.findAll();
Collections.sort(platformOptions, Comparator.comparing(PlatformOptions::getWeight).reversed());
return platformOptions;
} catch (Exception e) {
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