From 7e56fd2fbb5bf7452176e66c3223c5d5131e0536 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 05 Nov 2020 15:30:32 +0800
Subject: [PATCH] modify

---
 src/test/java/com/xcong/excoin/FilterTest.java          |    7 +++++++
 src/main/java/com/xcong/excoin/utils/TRC20ApiUtils.java |   37 +++++++++++++++++++++++++++++++++++++
 src/main/resources/application-prod.yml                 |    2 +-
 src/test/java/com/xcong/excoin/SRCTest.java             |    7 +++++++
 4 files changed, 52 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/utils/TRC20ApiUtils.java b/src/main/java/com/xcong/excoin/utils/TRC20ApiUtils.java
new file mode 100644
index 0000000..dde4c24
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/utils/TRC20ApiUtils.java
@@ -0,0 +1,37 @@
+package com.xcong.excoin.utils;
+
+import cn.hutool.crypto.SecureUtil;
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSONObject;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author wzy
+ * @date 2020-11-05
+ **/
+public class TRC20ApiUtils {
+    private static final String SRC_API = "http://27.50.59.35:5002/";
+    private static final String SIGN_STR = "w@a!llokmet";
+
+    public static void apply() {
+        Map<String, Object> param = new HashMap<>();
+        String orderNo = "123445";
+        String userid = "11";
+        String symbol = "USDT";
+        String amount = "1";
+        String toAddress = "Ox";
+        param.put("orderno", orderNo);
+        param.put("userid", userid);
+        param.put("symbol", symbol);
+        param.put("toAddress", toAddress);
+        param.put("amount", new BigDecimal(amount));
+        param.put("sign", SecureUtil.md5(orderNo + userid + symbol + amount + toAddress + SIGN_STR));
+        HttpRequest request = HttpRequest.post(SRC_API + "transout/created");
+        String body = request.body(JSONObject.toJSONString(param)).execute().body();
+        System.out.println(body);
+    }
+
+}
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index 2276275..5645a0d 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -100,7 +100,7 @@
   other-job: true
   loop-job: false
   rabbit-consumer: false
-  block-job: false
+  block-job: true
 
 aliyun:
   oss:
diff --git a/src/test/java/com/xcong/excoin/FilterTest.java b/src/test/java/com/xcong/excoin/FilterTest.java
new file mode 100644
index 0000000..fe53525
--- /dev/null
+++ b/src/test/java/com/xcong/excoin/FilterTest.java
@@ -0,0 +1,7 @@
+package com.xcong.excoin;/**
+*
+* @author wzy
+* @date 2020-11-04
+**/
+public class FilterTest {
+}
diff --git a/src/test/java/com/xcong/excoin/SRCTest.java b/src/test/java/com/xcong/excoin/SRCTest.java
new file mode 100644
index 0000000..0513d06
--- /dev/null
+++ b/src/test/java/com/xcong/excoin/SRCTest.java
@@ -0,0 +1,7 @@
+package com.xcong.excoin;/**
+*
+* @author wzy
+* @date 2020-11-05
+**/
+public class SRCTest {
+}

--
Gitblit v1.9.1