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
14348ca5
Commit
14348ca5
authored
Sep 16, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
7011aa88
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
PdsProductsUpdateTask.java
...in/java/com/egolm/pds/schedule/PdsProductsUpdateTask.java
+5
-0
PdsService.java
src/main/java/com/egolm/pds/schedule/service/PdsService.java
+3
-1
logback.xml
src/main/resources/logback.xml
+1
-0
No files found.
src/main/java/com/egolm/pds/schedule/PdsProductsUpdateTask.java
View file @
14348ca5
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.common.DateUtil
;
import
com.egolm.pds.config.HttpUtil
;
import
com.egolm.pds.config.HttpUtil
;
import
com.egolm.pds.schedule.service.PdsService
;
import
com.egolm.pds.schedule.service.PdsService
;
...
@@ -107,4 +108,8 @@ public class PdsProductsUpdateTask {
...
@@ -107,4 +108,8 @@ public class PdsProductsUpdateTask {
return
jsonArray
==
null
?
0
:
jsonArray
.
size
();
return
jsonArray
==
null
?
0
:
jsonArray
.
size
();
}
}
public
static
void
main
(
String
[]
args
)
{
Date
date
=
new
Date
(
1568079001765L
);
System
.
out
.
println
(
DateUtil
.
format
(
date
));
}
}
}
src/main/java/com/egolm/pds/schedule/service/PdsService.java
View file @
14348ca5
package
com
.
egolm
.
pds
.
schedule
.
service
;
package
com
.
egolm
.
pds
.
schedule
.
service
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -9,6 +10,7 @@ import org.springframework.stereotype.Component;
...
@@ -9,6 +10,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.pds.config.HttpUtil
;
import
com.egolm.pds.config.HttpUtil
;
...
@@ -29,7 +31,7 @@ public class PdsService {
...
@@ -29,7 +31,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
));
System
.
out
.
println
(
DateUtil
.
format
(
new
Date
())
+
"
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
);
...
...
src/main/resources/logback.xml
View file @
14348ca5
...
@@ -46,5 +46,6 @@
...
@@ -46,5 +46,6 @@
<logger
name=
"net"
level=
"ERROR"
/>
<logger
name=
"net"
level=
"ERROR"
/>
<logger
name=
"org"
level=
"INFO"
/>
<logger
name=
"org"
level=
"INFO"
/>
<logger
name=
"io"
level=
"INFO"
/>
<logger
name=
"io"
level=
"INFO"
/>
<logger
name=
"com.egolm"
level=
"DEBUG"
/>
</configuration>
</configuration>
\ No newline at end of file
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