From 370f042f439bd16b682b712a920a70794d7878cb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期三, 19 十一月 2025 10:53:42 +0800
Subject: [PATCH] 1.添加EE级别的操作员;
---
SourceCode/Bond/Servo/CUserManager2.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CUserManager2.cpp b/SourceCode/Bond/Servo/CUserManager2.cpp
index 4f45e52..373025f 100644
--- a/SourceCode/Bond/Servo/CUserManager2.cpp
+++ b/SourceCode/Bond/Servo/CUserManager2.cpp
@@ -4,6 +4,7 @@
#include <vector>
#include <map>
#include <utility>
+#include <algorithm>
#include <sstream>
#include <cwchar>
@@ -146,9 +147,15 @@
}
}
+ std::sort(roles.begin(), roles.end(), [](const RoleInfo& a, const RoleInfo& b) {
+ if (a.level == b.level) {
+ return a.name < b.name;
+ }
+ return a.level > b.level;
+ });
+
return roles;
}
-
std::vector<CUserManager2::UserInfo> CUserManager2::getUsers()
{
std::vector<UserInfo> users;
--
Gitblit v1.9.3