Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-ds
Project
Project
Details
Activity
Releases
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
李良停
sh-ds
Commits
dbc35414
Commit
dbc35414
authored
Mar 15, 2021
by
喻春霖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
09e04b77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
LogStatisticsController.java
.../authcenter/agent/controller/LogStatisticsController.java
+25
-5
No files found.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/controller/LogStatisticsController.java
View file @
dbc35414
...
...
@@ -111,19 +111,29 @@ public class LogStatisticsController {
if
(
null
!=
month
){
param
.
put
(
"yearMonth"
,
month
);
}
long
all_auth
=
authLogService
.
count
(
param
);
List
<
StatItem
>
browserResult
=
new
ArrayList
<>();
List
<
String
>
browserList
=
authLogService
.
distinct
(
"browser"
,
param
);
long
unknownBrowser
=
all_auth
;
if
(
CollectionUtils
.
isNotEmpty
(
browserList
)){
browserList
.
forEach
(
item
->
{
for
(
String
item
:
browserList
)
{
param
.
put
(
"browser"
,
item
);
long
count
=
authLogService
.
count
(
param
);
StatItem
statItem
=
new
StatItem
();
statItem
.
setName
(
item
);
statItem
.
setCount
(
count
);
unknownBrowser
=
unknownBrowser
-
count
;
browserResult
.
add
(
statItem
);
});
}
}
if
(
unknownBrowser
>
0
){
StatItem
statItem
=
new
StatItem
();
statItem
.
setName
(
"unknown"
);
statItem
.
setCount
(
unknownBrowser
);
browserResult
.
add
(
statItem
);
}
result
.
put
(
"browser"
,
browserResult
);
...
...
@@ -132,15 +142,25 @@ public class LogStatisticsController {
param
.
remove
(
"browser"
);
List
<
String
>
osList
=
authLogService
.
distinct
(
"os"
,
param
);
long
unknownOs
=
all_auth
;
if
(
CollectionUtils
.
isNotEmpty
(
osList
)){
osList
.
forEach
(
item
->
{
for
(
String
item
:
osList
)
{
param
.
put
(
"os"
,
item
);
long
count
=
authLogService
.
count
(
param
);
StatItem
statItem
=
new
StatItem
();
statItem
.
setName
(
item
);
statItem
.
setCount
(
count
);
osResult
.
add
(
statItem
);
});
unknownOs
=
unknownOs
-
count
;
}
}
if
(
unknownOs
>
0
){
StatItem
statItem
=
new
StatItem
();
statItem
.
setName
(
"unknown"
);
statItem
.
setCount
(
unknownOs
);
osResult
.
add
(
statItem
);
}
result
.
put
(
"os"
,
osResult
);
return
MapMessage
.
successMessage
().
add
(
"data"
,
result
);
...
...
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