Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
afanti-open-api
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
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-ms
afanti-open-api
Commits
f7eedf41
Commit
f7eedf41
authored
May 29, 2025
by
hejincai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 时间开放到2025-01-01
parent
9e5d9600
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
DataReportService.java
...om/afanticar/afantiopenapi/service/DataReportService.java
+3
-3
No files found.
src/main/java/com/afanticar/afantiopenapi/service/DataReportService.java
View file @
f7eedf41
...
...
@@ -85,9 +85,9 @@ public class DataReportService {
private
void
handleTimeRange
(
DataReportRequestDTO
requestBody
)
{
LocalDate
yesterday
=
LocalDate
.
now
().
minusDays
(
1
);
if
(
Objects
.
nonNull
(
requestBody
.
getStartTime
()))
{
LocalDate
sevenDaysAgo
=
LocalDate
.
now
().
minusDays
(
7
);
if
(
sevenDaysAgo
.
isAfter
(
requestBody
.
getStartTime
()))
{
throw
new
ApiException
(
ResultCodeEnum
.
VALIDATE_FAILED
.
getCode
(),
"开始时间不能早于
前7天
"
);
LocalDate
earliestYear
=
LocalDate
.
parse
(
"2025-01-01"
);
if
(
earliestYear
.
isAfter
(
requestBody
.
getStartTime
()))
{
throw
new
ApiException
(
ResultCodeEnum
.
VALIDATE_FAILED
.
getCode
(),
"开始时间不能早于
2025-01-01
"
);
}
}
if
(
Objects
.
isNull
(
requestBody
.
getStartTime
())
&&
Objects
.
isNull
(
requestBody
.
getEndTime
()))
{
...
...
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