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
fc1ab4fd
Commit
fc1ab4fd
authored
May 10, 2022
by
wangsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update date range
parent
a02dbf5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
StatisticsController.java
...den/authcenter/agent/controller/StatisticsController.java
+21
-3
No files found.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/controller/StatisticsController.java
View file @
fc1ab4fd
...
...
@@ -212,7 +212,14 @@ public class StatisticsController {
if
(
latestDays
>
30
){
type
=
2
;
}
Date
startDate
=
getStartDay
(
latestDays
);
Date
startDate
;
if
(
type
==
1
){
startDate
=
getStartDay
(
latestDays
-
1
);
}
else
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
MONTH
,
-(
latestDays
/
30
-
1
));
startDate
=
calendar
.
getTime
();
}
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
Date
endDate
=
new
Date
();
...
...
@@ -265,14 +272,25 @@ public class StatisticsController {
@ResponseBody
public
MapMessage
authUserTypeSum
(
@RequestParam
(
value
=
"clientId"
,
required
=
false
)
String
clientId
,
@RequestParam
(
value
=
"latestDays"
,
defaultValue
=
"7"
)
Integer
latestDays
)
{
int
type
=
1
;
// 1: 日数据 2: 月数据
if
(
latestDays
>
30
){
type
=
2
;
}
Date
startDate
;
if
(
type
==
1
){
startDate
=
getStartDay
(
latestDays
-
1
);
}
else
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
MONTH
,
-(
latestDays
/
30
-
1
));
startDate
=
calendar
.
getTime
();
}
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"loginSuccessFlag"
,
true
);
if
(
clientId
!=
null
){
param
.
put
(
"clientId"
,
clientId
);
}
Date
startDate
=
getStartDay
(
latestDays
);
long
days
=
DateUtils
.
dayDiff
(
new
Date
(),
startDate
);
long
all_auth
=
authLogService
.
count
(
param
,
startDate
);
...
...
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