Commit bf23be30 authored by Quxl's avatar Quxl

x

parent 050870a3
......@@ -26,25 +26,14 @@ 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);
}
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() {
......
......@@ -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
......
......@@ -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
......
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