|
|
@@ -1,6 +1,8 @@
|
|
|
package com.malk.taisen.service.impl;
|
|
|
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
import com.malk.server.dingtalk.DDR_New;
|
|
|
@@ -265,7 +267,7 @@ public class ArNotifyServiceImpl implements ArNotifyService {
|
|
|
return rows;
|
|
|
}
|
|
|
|
|
|
- private long dateMillis(String date) {
|
|
|
+ private static long dateMillis(String date) {
|
|
|
try {
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
|
|
formatter.setLenient(false);
|
|
|
@@ -285,4 +287,13 @@ public class ArNotifyServiceImpl implements ArNotifyService {
|
|
|
private interface Action {
|
|
|
Object execute();
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String url = "https://etl-nonprod-tasks.tysondt.com:443/api/1/rest/feed/run/task/TysonNonProd/projects/10-QA-team-cash-to-order/tk_dingtalk_to_sap_otc_inquiry?bearer_token=Rs8eIy614To-g4UAQTsYTt@G9bRMhQrl";
|
|
|
+// String url2 = "https://etl-nonprod-tasks.tysondt.com:443/api/1/rest/feed/run/task/TysonNonProd/projects/00-STG-team-cash-to-order/tk_dingtalk_to_sap_otc_unlocked_orders_inquiry?bearer_token=i2AZ93FBOD42aPNLyWACGxXRyK0LdY8U";
|
|
|
+ String result= HttpUtil.createPost(url).body(JSONObject.toJSONString(UtilMap.map("CUSTOMER_NUMBER","3000045"))).form(JSONObject.toJSONString(UtilMap.map("requestID, interface_no","12345, OTC002"))).execute().body();
|
|
|
+ System.out.println(result);
|
|
|
+// String result2= HttpUtil.createPost(url2).body(JSONObject.toJSONString(UtilMap.map("CUSTOMER_NUMBER","1000253"))).form(JSONObject.toJSONString(UtilMap.map("requestID","1234"))).execute().body();
|
|
|
+// System.out.println(result2);
|
|
|
+ }
|
|
|
}
|