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
cc288b3d
Commit
cc288b3d
authored
Aug 28, 2023
by
陈炎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
去除频控,加上300ms定时
parent
c01056b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
FawOpenController.java
...afanticar/afantiopenapi/controller/FawOpenController.java
+0
-8
FawOpenService.java
...a/com/afanticar/afantiopenapi/service/FawOpenService.java
+9
-0
No files found.
src/main/java/com/afanticar/afantiopenapi/controller/FawOpenController.java
View file @
cc288b3d
...
@@ -80,10 +80,6 @@ public class FawOpenController extends BaseController {
...
@@ -80,10 +80,6 @@ public class FawOpenController extends BaseController {
if
(!
type
.
equals
(
quarter
)
&&
!
type
.
equals
(
monthly
))
{
if
(!
type
.
equals
(
quarter
)
&&
!
type
.
equals
(
monthly
))
{
return
error
(
"90001"
,
"type传参异常,未开放数据类型"
);
return
error
(
"90001"
,
"type传参异常,未开放数据类型"
);
}
}
BaseResponse
check
=
baseService
.
baseValidator
(
request
,
client
,
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
return
success
(
fawOpenService
.
awemes
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
return
success
(
fawOpenService
.
awemes
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
}
}
...
@@ -109,10 +105,6 @@ public class FawOpenController extends BaseController {
...
@@ -109,10 +105,6 @@ public class FawOpenController extends BaseController {
if
(!
type
.
equals
(
quarter
)
&&
!
type
.
equals
(
monthly
))
{
if
(!
type
.
equals
(
quarter
)
&&
!
type
.
equals
(
monthly
))
{
return
error
(
"90001"
,
"type传参异常,未开放数据类型!"
);
return
error
(
"90001"
,
"type传参异常,未开放数据类型!"
);
}
}
BaseResponse
check
=
baseService
.
baseValidator
(
request
,
client
,
dataType
,
limit
,
limitPeriod
);
if
(
check
!=
null
)
{
return
check
;
}
return
success
(
fawOpenService
.
lives
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
return
success
(
fawOpenService
.
lives
(
publishDateStart
,
publishDateEnd
,
type
,
pageNum
,
pageSize
));
}
}
...
...
src/main/java/com/afanticar/afantiopenapi/service/FawOpenService.java
View file @
cc288b3d
...
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
...
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* @author chin
* @author chin
...
@@ -49,6 +50,10 @@ public class FawOpenService {
...
@@ -49,6 +50,10 @@ public class FawOpenService {
static
String
quarter
=
"quarter"
;
static
String
quarter
=
"quarter"
;
public
BasePageVO
<
HongqiAwemeIncentiveVO
>
awemes
(
Date
publishDateStart
,
Date
publishDateEnd
,
String
type
,
Integer
pageNum
,
Integer
pageSize
)
{
public
BasePageVO
<
HongqiAwemeIncentiveVO
>
awemes
(
Date
publishDateStart
,
Date
publishDateEnd
,
String
type
,
Integer
pageNum
,
Integer
pageSize
)
{
try
{
TimeUnit
.
MILLISECONDS
.
sleep
(
300L
);
}
catch
(
InterruptedException
ignored
)
{
}
PageHelper
.
orderBy
(
" publish_time DESC "
);
PageHelper
.
orderBy
(
" publish_time DESC "
);
if
(
monthly
.
equals
(
type
))
{
if
(
monthly
.
equals
(
type
))
{
IPage
<
HongqiAwemeIncentiveMonthly
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
IPage
<
HongqiAwemeIncentiveMonthly
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
...
@@ -72,6 +77,10 @@ public class FawOpenService {
...
@@ -72,6 +77,10 @@ public class FawOpenService {
}
}
public
BasePageVO
<
HongqiLiveIncentiveVO
>
lives
(
Date
publishDateStart
,
Date
publishDateEnd
,
String
type
,
Integer
pageNum
,
Integer
pageSize
)
{
public
BasePageVO
<
HongqiLiveIncentiveVO
>
lives
(
Date
publishDateStart
,
Date
publishDateEnd
,
String
type
,
Integer
pageNum
,
Integer
pageSize
)
{
try
{
TimeUnit
.
MILLISECONDS
.
sleep
(
300L
);
}
catch
(
InterruptedException
ignored
)
{
}
PageHelper
.
orderBy
(
" publish_time DESC "
);
PageHelper
.
orderBy
(
" publish_time DESC "
);
if
(
monthly
.
equals
(
type
))
{
if
(
monthly
.
equals
(
type
))
{
IPage
<
HongqiLiveIncentiveMonthly
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
IPage
<
HongqiLiveIncentiveMonthly
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
...
...
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