Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
0031a7d7
Commit
0031a7d7
authored
Mar 03, 2021
by
陈浩建
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1c49ba71
1e1e49ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
4 deletions
+39
-4
new-user/src/main/resources/application-prod.yml
+1
-1
new-user/src/main/resources/application.yml
+1
-1
service-manager/src/main/java/com/winsun/controller/UserDeployController.java
+35
-0
service-manager/src/main/java/com/winsun/service/impl/AccessStatisticServiceImpl.java
+2
-2
No files found.
new-user/src/main/resources/application-prod.yml
View file @
0031a7d7
...
@@ -20,7 +20,7 @@ server:
...
@@ -20,7 +20,7 @@ server:
max-threads
:
200
max-threads
:
200
max-connections
:
2000
max-connections
:
2000
jetty
:
jetty
:
max-http-post-size
:
1000000
max-http-post-size
:
1000000
00
winsun
:
winsun
:
app
:
app
:
version
:
@
project.version@
version
:
@
project.version@
...
...
new-user/src/main/resources/application.yml
View file @
0031a7d7
...
@@ -18,7 +18,7 @@ server:
...
@@ -18,7 +18,7 @@ server:
max-threads
:
200
max-threads
:
200
max-connections
:
2000
max-connections
:
2000
jetty
:
jetty
:
max-http-post-size
:
1000000
max-http-post-size
:
1000000
00
winsun
:
winsun
:
app
:
app
:
version
:
@
project.version@
version
:
@
project.version@
...
...
service-manager/src/main/java/com/winsun/controller/UserDeployController.java
View file @
0031a7d7
...
@@ -142,4 +142,39 @@ public class UserDeployController extends BaseController {
...
@@ -142,4 +142,39 @@ public class UserDeployController extends BaseController {
List
<
School
>
list
=
schoolMapper
.
selectList
(
schoolWrapper
);
List
<
School
>
list
=
schoolMapper
.
selectList
(
schoolWrapper
);
return
ResponseData
.
success
(
list
);
return
ResponseData
.
success
(
list
);
}
}
/**
* 解锁账户
* @param userId
* @return
*/
@Permission
(
menuname
=
"解锁用户"
,
value
=
"unlockUser"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
unlockUser
(
String
userId
)
{
SysUser
sysUser
=
new
SysUser
();
sysUser
.
setId
(
userId
);
sysUser
.
setStatus
(
"1"
);
Integer
integer
=
sysUserMapper
.
updateById
(
sysUser
);
if
(
integer
>
0
)
{
return
ResponseData
.
success
(
"解锁成功"
);
}
return
ResponseData
.
error
(
"解锁失败"
);
}
/**
* 锁定账户
* @param userId
* @return
*/
@Permission
(
menuname
=
"锁定用户"
,
value
=
"lockUser"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
String
>
lockUser
(
String
userId
)
{
SysUser
sysUser
=
new
SysUser
();
sysUser
.
setId
(
userId
);
sysUser
.
setStatus
(
"2"
);
Integer
integer
=
sysUserMapper
.
updateById
(
sysUser
);
if
(
integer
>
0
)
{
return
ResponseData
.
success
(
"锁定成功"
);
}
return
ResponseData
.
error
(
"锁定失败"
);
}
}
}
service-manager/src/main/java/com/winsun/service/impl/AccessStatisticServiceImpl.java
View file @
0031a7d7
...
@@ -136,7 +136,7 @@ public class AccessStatisticServiceImpl implements AccessStatisticService {
...
@@ -136,7 +136,7 @@ public class AccessStatisticServiceImpl implements AccessStatisticService {
if
(
userIds
!=
null
&&
userIds
.
size
()
>
0
)
{
if
(
userIds
!=
null
&&
userIds
.
size
()
>
0
)
{
userIdsDql
.
append
(
"("
);
userIdsDql
.
append
(
"("
);
for
(
int
i
=
0
;
i
<
userIds
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
userIds
.
size
();
++
i
)
{
userIdsDql
.
append
(
"
http_referer
:*"
).
append
(
userIds
.
get
(
i
)).
append
(
"* "
);
userIdsDql
.
append
(
"
request_body
:*"
).
append
(
userIds
.
get
(
i
)).
append
(
"* "
);
if
(
userIds
.
size
()
!=
(
i
+
1
))
{
if
(
userIds
.
size
()
!=
(
i
+
1
))
{
userIdsDql
.
append
(
"OR "
);
userIdsDql
.
append
(
"OR "
);
}
}
...
@@ -145,7 +145,7 @@ public class AccessStatisticServiceImpl implements AccessStatisticService {
...
@@ -145,7 +145,7 @@ public class AccessStatisticServiceImpl implements AccessStatisticService {
}
}
log
.
info
(
"统计用户:"
+
userIdsDql
.
toString
());
log
.
info
(
"统计用户:"
+
userIdsDql
.
toString
());
String
dql
=
"{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":"
+
startDate
.
getTime
()
+
",\"lte\":"
+
endDate
.
getTime
()
+
",\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"request
:*.do
* "
+
userIdsDql
.
toString
()
+
"\"}}]}},\"aggs\":{\"groupBy\": {\"date_histogram\": {\"field\": \"@timestamp\",\"interval\": \""
+
type
+
"\"},\"aggs\":{\"userCount\":{\"cardinality\":{\"field\":\"remote_addr\"}}}}}}"
;
String
dql
=
"{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":"
+
startDate
.
getTime
()
+
",\"lte\":"
+
endDate
.
getTime
()
+
",\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"request
_uri:*checkHhr
* "
+
userIdsDql
.
toString
()
+
"\"}}]}},\"aggs\":{\"groupBy\": {\"date_histogram\": {\"field\": \"@timestamp\",\"interval\": \""
+
type
+
"\"},\"aggs\":{\"userCount\":{\"cardinality\":{\"field\":\"remote_addr\"}}}}}}"
;
log
.
info
(
"dql:"
+
dql
);
log
.
info
(
"dql:"
+
dql
);
try
{
try
{
String
esSearch
=
AccessStatisticDataSearchUtils
.
esSearch
(
dql
);
String
esSearch
=
AccessStatisticDataSearchUtils
.
esSearch
(
dql
);
...
...
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