Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sobot_android
Sobot_module_Dev
Commits
1fac0529
Commit
1fac0529
authored
Aug 18, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
呼叫权限 全局权限合菜单权限合到一起
parent
7432ebc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
SobotLoginTools.java
...src/main/java/com/sobot/common/login/SobotLoginTools.java
+12
-0
No files found.
sobot_common/src/main/java/com/sobot/common/login/SobotLoginTools.java
View file @
1fac0529
...
...
@@ -17,6 +17,7 @@ import com.sobot.network.apiUtils.SobotBaseCode;
import
com.sobot.network.apiUtils.SobotHttpUtils
;
import
com.sobot.network.http.HttpBaseUtils
;
import
com.sobot.utils.SobotSharedPreferencesUtil
;
import
com.sobot.utils.SobotStringUtils
;
import
org.json.JSONArray
;
...
...
@@ -130,6 +131,17 @@ public class SobotLoginTools {
List
<
ServiceFunctionVoModel
>
functions
=
new
ArrayList
<>();
JSONArray
items
=
resonseObj
.
optJSONArray
(
"items"
);
getListByObj
(
functions
,
items
);
if
(
serviceInfoModel
.
getGlobalPermissions
()
!=
null
)
{
//全局权限
for
(
int
i
=
0
;
i
<
serviceInfoModel
.
getGlobalPermissions
().
size
();
i
++)
{
if
(!
SobotStringUtils
.
isEmpty
(
serviceInfoModel
.
getGlobalPermissions
().
get
(
i
)))
{
ServiceFunctionVoModel
functionVoModel
=
new
ServiceFunctionVoModel
();
functionVoModel
.
setCode
(
serviceInfoModel
.
getGlobalPermissions
().
get
(
i
));
functions
.
add
(
functionVoModel
);
}
}
}
serviceInfoModel
.
setFunctionStr
(
functions
);
//保存在数据库
ServiceInfoManager
.
getInstance
().
saveInfo
(
serviceInfoModel
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment