Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
Project
Project
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
15所TongWeb
aserver
Commits
cc4ff502
Commit
cc4ff502
authored
Nov 17, 2020
by
陈勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
做演示控制
parent
815fd3f1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
IndexController.java
.../java/com/archser/aserver/controller/IndexController.java
+21
-0
DM_UpdateSQL.xml
src/main/resources/DBUpdate/DM_UpdateSQL.xml
+6
-3
No files found.
src/main/java/com/archser/aserver/controller/IndexController.java
View file @
cc4ff502
...
@@ -125,6 +125,27 @@ public class IndexController extends Controller {
...
@@ -125,6 +125,27 @@ public class IndexController extends Controller {
logService
.
saveAsLog
(
"login"
,
username
,
JwtInterceptor
.
getIpAddr
(
getRequest
()),
"该用户非本系统用户正在非法登录"
,
app
);
logService
.
saveAsLog
(
"login"
,
username
,
JwtInterceptor
.
getIpAddr
(
getRequest
()),
"该用户非本系统用户正在非法登录"
,
app
);
return
;
return
;
}
}
/**chenyong 20201116 add 增加演示时提醒 start**/
String
showSetting
=
Db
.
queryStr
(
Db
.
getSql
(
"getConfigByName"
),
"showSetting"
);
if
(
showSetting
!=
null
)
{
String
[]
showSettingArr
=
showSetting
.
split
(
"\\|"
);
boolean
isShow
=
"是"
.
equals
(
showSettingArr
[
0
]);
if
(
isShow
)
{
boolean
isShowUser
=
false
;
String
[]
userNameArr
=
showSettingArr
[
1
].
split
(
","
);
for
(
String
userName:
userNameArr
)
{
if
(
username
.
equals
(
userName
))
{
isShowUser
=
true
;
break
;
}
}
if
(!
isShowUser
)
{
this
.
renderJson
(
Ret
.
fail
(
"msg"
,
"系统正在演示中,请稍候......"
));
return
;
}
}
}
/**chenyong 20201116 add end**/
// 一旦开启三员 admin用户不能使用
// 一旦开启三员 admin用户不能使用
if
(
"admin"
.
equals
(
user
.
getUsername
()))
{
if
(
"admin"
.
equals
(
user
.
getUsername
()))
{
Integer
userCount
=
Db
.
queryInt
(
Db
.
getSql
(
"hasThreeMemberUsersCount"
));
Integer
userCount
=
Db
.
queryInt
(
Db
.
getSql
(
"hasThreeMemberUsersCount"
));
...
...
src/main/resources/DBUpdate/DM_UpdateSQL.xml
View file @
cc4ff502
...
@@ -2405,7 +2405,9 @@
...
@@ -2405,7 +2405,9 @@
alter table"AS_FOURTEST" modify "LIB_ID" NUMBER(9, 0);
alter table"AS_FOURTEST" modify "LIB_ID" NUMBER(9, 0);
</sql>
</sql>
</version>
</version>
<version
edition=
"101"
description=
"设置是否演示以及演示用户"
>
<sql
creator=
"chenyong"
createDate=
"20201117"
note=
"设置是否演示以及演示用户"
>
insert into AS_CONFIG values (SEQ_CONFIG.nextval,'showSetting','是|admin,Sec,Sys,Aud,dagly','是表示正在演示,否表示不演示。与演示用户之前用|分割,演示用户之间用逗号分割');
</sql>
</version>
</update>
</update>
\ No newline at end of file
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