Commit 7cc9df27 authored by Administrator's avatar Administrator

Merge branch 'fix-hotbugs' into 'master'

平台选项增加排序字段

See merge request !197
parents 23c4f5a7 7125a159
...@@ -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;
} }
...@@ -765,6 +765,7 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -765,6 +765,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