Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
task3.0
Overview
Overview
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
首航-临时账号
task3.0
Commits
1d939ba6
Commit
1d939ba6
authored
Dec 24, 2020
by
java-李谡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变更航班动态统计逻辑
parent
122e8878
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
DspReleaseInfoService.java
src/main/java/com/foc/service/DspReleaseInfoService.java
+5
-4
No files found.
src/main/java/com/foc/service/DspReleaseInfoService.java
View file @
1d939ba6
...
@@ -27,6 +27,7 @@ import java.io.Reader;
...
@@ -27,6 +27,7 @@ import java.io.Reader;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.security.GeneralSecurityException
;
import
java.security.GeneralSecurityException
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -68,7 +69,7 @@ public class DspReleaseInfoService {
...
@@ -68,7 +69,7 @@ public class DspReleaseInfoService {
log
.
info
(
"开始"
+
date
+
"时间统计"
);
log
.
info
(
"开始"
+
date
+
"时间统计"
);
for
(
String
s
:
flightNoList
)
{
for
(
String
s
:
flightNoList
)
{
//生成requestCode
//生成requestCode
Map
<
String
,
String
>
map
=
buildGatewayRequestString
(
s
,
key
,
userAccount
,
password
);
Map
<
String
,
String
>
map
=
buildGatewayRequestString
(
s
,
key
,
userAccount
,
password
,
date
);
//掉接口
//掉接口
String
resultString
=
nativeHttpCall
(
map
,
gatewayUatUrl
,
key
);
String
resultString
=
nativeHttpCall
(
map
,
gatewayUatUrl
,
key
);
//解密
//解密
...
@@ -79,15 +80,15 @@ public class DspReleaseInfoService {
...
@@ -79,15 +80,15 @@ public class DspReleaseInfoService {
}
}
public
static
Map
<
String
,
String
>
buildGatewayRequestString
(
String
flightNo
,
String
key
,
String
userAccount
,
String
password
)
throws
UnsupportedEncodingException
,
GeneralSecurityException
{
public
static
Map
<
String
,
String
>
buildGatewayRequestString
(
String
flightNo
,
String
key
,
String
userAccount
,
String
password
,
LocalDate
date
)
throws
UnsupportedEncodingException
,
GeneralSecurityException
{
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
String
currentTimeMillisStr
=
String
.
valueOf
(
System
.
currentTimeMillis
());
String
currentTimeMillisStr
=
String
.
valueOf
(
System
.
currentTimeMillis
());
/** step1: 参考接口文档 2.4输入参数说明 章节,并组装成json string **/
/** step1: 参考接口文档 2.4输入参数说明 章节,并组装成json string **/
ApiRequest
apiRequest
=
new
ApiRequest
();
ApiRequest
apiRequest
=
new
ApiRequest
();
apiRequest
.
getOptions
().
put
(
"flightNos"
,
flightNo
);
apiRequest
.
getOptions
().
put
(
"flightNos"
,
flightNo
);
apiRequest
.
getOptions
().
put
(
"stdTimeStart"
,
DateUtils
.
getTodayStartTime
()
);
apiRequest
.
getOptions
().
put
(
"stdTimeStart"
,
date
.
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
)
+
" 00:00:00"
);
apiRequest
.
getOptions
().
put
(
"stdTimeEnd"
,
DateUtils
.
getTodayEndTime
()
);
apiRequest
.
getOptions
().
put
(
"stdTimeEnd"
,
date
.
plusDays
(
1
).
format
(
DateTimeFormatter
.
ISO_LOCAL_DATE
)
+
" 00:00:00"
);
//分页参数
//分页参数
PageParam
pageParam
=
new
PageParam
();
PageParam
pageParam
=
new
PageParam
();
//从第一页开始
//从第一页开始
...
...
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