Commit 14348ca5 authored by Quxl's avatar Quxl

x

parent 7011aa88
...@@ -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));
}
} }
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);
......
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment