Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
1fcea70a
Commit
1fcea70a
authored
Mar 18, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nocommit
parent
dbb59cc8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/constant/ThirdPartyApiConstant.java
...a/pps/core/prediction/constant/ThirdPartyApiConstant.java
+5
-0
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/WellheadDailyProductionSituationService.java
...tion/service/WellheadDailyProductionSituationService.java
+1
-2
No files found.
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/constant/ThirdPartyApiConstant.java
View file @
1fcea70a
...
@@ -14,6 +14,11 @@ public class ThirdPartyApiConstant {
...
@@ -14,6 +14,11 @@ public class ThirdPartyApiConstant {
*/
*/
public
static
final
String
CQ_TOKEN_CACHE_KEY
=
"pps.third.cq.token"
;
public
static
final
String
CQ_TOKEN_CACHE_KEY
=
"pps.third.cq.token"
;
/**
* 过期时间
*/
public
static
final
int
MAX_SECOND
=
300
;
/**
/**
* 长庆Token
* 长庆Token
*/
*/
...
...
C12-prediction/pps-core-prediction/src/main/java/pps/core/prediction/service/WellheadDailyProductionSituationService.java
View file @
1fcea70a
...
@@ -153,9 +153,8 @@ public class WellheadDailyProductionSituationService {
...
@@ -153,9 +153,8 @@ public class WellheadDailyProductionSituationService {
if
(
ObjectUtil
.
isNull
(
exist
))
{
if
(
ObjectUtil
.
isNull
(
exist
))
{
token
=
this
.
getCqToken
(
context
);
token
=
this
.
getCqToken
(
context
);
}
else
{
}
else
{
long
between
=
DateUtil
.
between
(
exist
.
getCurrentDate
(),
DateUtil
.
date
(),
DateUnit
.
SECOND
);
long
duration
=
(
long
)
exist
.
getDuration
();
long
duration
=
(
long
)
exist
.
getDuration
();
if
(
duration
-
between
<
300
)
{
if
(
duration
-
DateUtil
.
between
(
exist
.
getCurrentDate
(),
DateUtil
.
date
(),
DateUnit
.
SECOND
)
<
ThirdPartyApiConstant
.
MAX_SECOND
)
{
token
=
this
.
getCqToken
(
context
);
token
=
this
.
getCqToken
(
context
);
}
else
{
}
else
{
token
=
exist
.
getCode
();
token
=
exist
.
getCode
();
...
...
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