Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
poc
poc-api
Commits
e68cf43e
Commit
e68cf43e
authored
Dec 20, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: API积分数据分析+导出
parent
34e2c15a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
DataAnalyzeTimeRangeEnum.java
.../poc/data_analyze/constants/DataAnalyzeTimeRangeEnum.java
+2
-1
AgentDataAnalyzeServiceImpl.java
...oc/expose/aggregate/impl/AgentDataAnalyzeServiceImpl.java
+6
-0
No files found.
src/main/java/cn/com/poc/data_analyze/constants/DataAnalyzeTimeRangeEnum.java
View file @
e68cf43e
...
@@ -10,6 +10,7 @@ import cn.com.yict.framemax.core.i18n.I18nMessageException;
...
@@ -10,6 +10,7 @@ import cn.com.yict.framemax.core.i18n.I18nMessageException;
*/
*/
public
enum
DataAnalyzeTimeRangeEnum
{
public
enum
DataAnalyzeTimeRangeEnum
{
customize
(
"customize"
),
customize
(
"customize"
),
today
(
"today"
),
week
(
"week"
),
week
(
"week"
),
month
(
"month"
),
month
(
"month"
),
;
;
...
@@ -29,7 +30,7 @@ public enum DataAnalyzeTimeRangeEnum {
...
@@ -29,7 +30,7 @@ public enum DataAnalyzeTimeRangeEnum {
}
}
public
static
DataAnalyzeTimeRangeEnum
getByType
(
String
type
)
{
public
static
DataAnalyzeTimeRangeEnum
getByType
(
String
type
)
{
for
(
DataAnalyzeTimeRangeEnum
item
:
values
()){
for
(
DataAnalyzeTimeRangeEnum
item
:
values
())
{
if
(
item
.
getType
().
equals
(
type
))
{
if
(
item
.
getType
().
equals
(
type
))
{
return
item
;
return
item
;
}
}
...
...
src/main/java/cn/com/poc/expose/aggregate/impl/AgentDataAnalyzeServiceImpl.java
View file @
e68cf43e
...
@@ -173,6 +173,12 @@ public class AgentDataAnalyzeServiceImpl implements AgentDataAnalyzeService {
...
@@ -173,6 +173,12 @@ public class AgentDataAnalyzeServiceImpl implements AgentDataAnalyzeService {
Date
endDate
;
Date
endDate
;
Date
startDate
;
Date
startDate
;
switch
(
DataAnalyzeTimeRangeEnum
.
getByType
(
rangType
))
{
switch
(
DataAnalyzeTimeRangeEnum
.
getByType
(
rangType
))
{
case
today:
endDate
=
DateUtils
.
getTodayEnd
();
startDate
=
DateUtils
.
getDayStartTime
(
endDate
);
startTime
=
DateUtils
.
formatDate
(
startDate
,
DateUtils
.
yyyy_MM_dd
);
endTime
=
DateUtils
.
formatDate
(
endDate
,
DateUtils
.
yyyy_MM_dd_HH_mm_ss
);
break
;
case
week:
case
week:
endDate
=
DateUtils
.
getTodayEnd
();
endDate
=
DateUtils
.
getTodayEnd
();
startDate
=
DateUtils
.
getDayStartTime
(
DateUtils
.
addDays
(
endDate
,
-
6
));
startDate
=
DateUtils
.
getDayStartTime
(
DateUtils
.
addDays
(
endDate
,
-
6
));
...
...
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