Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pdstask
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
曲欣亮
pdstask
Commits
bf23be30
Commit
bf23be30
authored
Jul 15, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
050870a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
18 deletions
+5
-18
PdsService.java
src/main/java/com/egolm/pds/schedule/service/PdsService.java
+5
-16
application-dev.yml
src/main/resources/application-dev.yml
+0
-1
application-pro.yml
src/main/resources/application-pro.yml
+0
-1
No files found.
src/main/java/com/egolm/pds/schedule/service/PdsService.java
View file @
bf23be30
...
...
@@ -26,26 +26,15 @@ public class PdsService {
@Value
(
"pds.auth_value"
)
private
String
authValue
;
@Value
(
"pds.is_execute_confirm"
)
private
String
isExecuteConfirmString
;
@Transactional
public
void
savePdsProduct
(
Object
transactionId
,
Map
<
String
,
Object
>
productMap
)
{
jdbcTemplate
.
save
(
"pds_article"
,
productMap
);
Boolean
isExecuteConfirm
=
false
;
try
{
isExecuteConfirm
=
Boolean
.
valueOf
(
isExecuteConfirmString
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
isExecuteConfirm
!=
null
&&
isExecuteConfirm
)
{
Map
<
String
,
String
>
parameters
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
authKey
,
authValue
);
parameters
.
put
(
"transaction_id"
,
transactionId
==
null
?
null
:
transactionId
.
toString
());
HttpUtil
.
post
(
urlUpdate
,
parameters
,
headers
);
}
}
public
JdbcTemplate
getJdbcTemplate
()
{
return
jdbcTemplate
;
...
...
src/main/resources/application-dev.yml
View file @
bf23be30
...
...
@@ -20,7 +20,6 @@ spring:
pds
:
cron
:
products_download
:
0 0 3 * * ?
is_execute_confirm
:
true
auth_key
:
x-api-key
auth_value
:
gPmsTNthxi5krwOTnaM9y5AhXlHrc6Ve5ik2GzQg
url_query
:
https://pztafj5g87.execute-api.ap-southeast-1.amazonaws.com/test/sunshine/new_products_with_prices
...
...
src/main/resources/application-pro.yml
View file @
bf23be30
...
...
@@ -20,7 +20,6 @@ spring:
pds
:
cron
:
products_download
:
0 0 3 * * ?
is_execute_confirm
:
true
auth_key
:
x-api-key
auth_value
:
gPmsTNthxi5krwOTnaM9y5AhXlHrc6Ve5ik2GzQg
url_query
:
https://api.goodsmaster.com/sunshine/new_products_with_prices
...
...
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