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
90cb24a6
Commit
90cb24a6
authored
Jul 17, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
1d2d9100
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
PdsProductsUpdateTask.java
...in/java/com/egolm/pds/schedule/PdsProductsUpdateTask.java
+0
-2
PdsService.java
src/main/java/com/egolm/pds/schedule/service/PdsService.java
+2
-0
No files found.
src/main/java/com/egolm/pds/schedule/PdsProductsUpdateTask.java
View file @
90cb24a6
...
@@ -46,8 +46,6 @@ public class PdsProductsUpdateTask {
...
@@ -46,8 +46,6 @@ public class PdsProductsUpdateTask {
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
authKey
,
authValue
);
headers
.
put
(
authKey
,
authValue
);
String
responseBody
=
HttpUtil
.
get
(
urlQuery
,
headers
);
String
responseBody
=
HttpUtil
.
get
(
urlQuery
,
headers
);
System
.
out
.
println
(
"headers"
+
JSON
.
toJSONString
(
headers
));
System
.
out
.
println
(
responseBody
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseBody
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
responseBody
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"data"
);
if
(
jsonArray
!=
null
)
{
if
(
jsonArray
!=
null
)
{
...
...
src/main/java/com/egolm/pds/schedule/service/PdsService.java
View file @
90cb24a6
...
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.pds.config.HttpUtil
;
import
com.egolm.pds.config.HttpUtil
;
...
@@ -28,6 +29,7 @@ public class PdsService {
...
@@ -28,6 +29,7 @@ public class PdsService {
@Transactional
@Transactional
public
void
savePdsProduct
(
Object
transactionId
,
Map
<
String
,
Object
>
productMap
)
{
public
void
savePdsProduct
(
Object
transactionId
,
Map
<
String
,
Object
>
productMap
)
{
System
.
out
.
println
(
"PDS Save >>"
+
transactionId
+
" "
+
JSON
.
toJSONString
(
productMap
));
jdbcTemplate
.
save
(
"pds_article"
,
productMap
);
jdbcTemplate
.
save
(
"pds_article"
,
productMap
);
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
authKey
,
authValue
);
headers
.
put
(
authKey
,
authValue
);
...
...
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