|
|
@@ -3,6 +3,8 @@ package com.usoftchina.saas.transfers.utils;
|
|
|
import com.usoftchina.saas.utils.JsonUtils;
|
|
|
import com.usoftchina.saas.utils.http.HttpUtil;
|
|
|
import com.usoftchina.saas.utils.http.HttpUtil.Response;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
@@ -14,6 +16,8 @@ import java.util.Map;
|
|
|
*/
|
|
|
public class SendUtil {
|
|
|
|
|
|
+ private static final Logger LOGGER = LoggerFactory.getLogger(SendUtil.class);
|
|
|
+
|
|
|
/**
|
|
|
* 发送请求给B2B
|
|
|
* @param url URL
|
|
|
@@ -25,6 +29,8 @@ public class SendUtil {
|
|
|
public static boolean sendToB2B(String url, String data, String accessSecretKey) throws Exception {
|
|
|
Map<String, String> params = new HashMap<String, String>();
|
|
|
params.put("data", JsonUtils.toJsonString(data));
|
|
|
+ LOGGER.info("url={}, accessSecretKey={}", url, accessSecretKey);
|
|
|
+ LOGGER.info("data={}", data);
|
|
|
Response response = HttpUtil.sendPostRequest(url, params, true, accessSecretKey);
|
|
|
if (response.getStatusCode() == 200){
|
|
|
return true;
|