From d2adc89b5970c2d855d4901722e18d98fc3b9480 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 11 Nov 2020 17:35:51 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 23 +++++++++++++++++++++++
src/test/java/com/xcong/excoin/SRCTest.java | 17 ++---------------
2 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
index b4f35f7..cd97f84 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -898,6 +898,29 @@
return Result.fail(MessageSourceUtils.getString("member_service_0082"));
}
+ if (CoinTypeEnum.USDT.name().equals(memberSubmitCoinApplyDto.getSymbol())) {
+ if ("ERC20".equals(memberSubmitCoinApplyDto.getLable())) {
+ boolean b = memberSubmitCoinApplyDto.getAddress().startsWith("0x");
+ if (!b) {
+ return Result.fail("提币地址错误");
+ }
+ }
+
+ if ("TRC20".equals(memberSubmitCoinApplyDto.getLable())) {
+ boolean t = memberSubmitCoinApplyDto.getAddress().startsWith("T");
+ if (!t) {
+ return Result.fail("提币地址错误");
+ }
+ }
+ }
+
+ if (CoinTypeEnum.RFNC.name().equals(memberSubmitCoinApplyDto.getSymbol())) {
+ boolean rfnc = memberSubmitCoinApplyDto.getAddress().startsWith("RFNC");
+ if (!rfnc) {
+ return Result.fail("提币地址错误");
+ }
+ }
+
boolean flag = commonservice.verifyCode(memberSubmitCoinApplyDto.getAccount(), memberSubmitCoinApplyDto.getCode());
if (flag) {
MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, memberSubmitCoinApplyDto.getSymbol());
diff --git a/src/test/java/com/xcong/excoin/SRCTest.java b/src/test/java/com/xcong/excoin/SRCTest.java
index 5169f21..5861ad1 100644
--- a/src/test/java/com/xcong/excoin/SRCTest.java
+++ b/src/test/java/com/xcong/excoin/SRCTest.java
@@ -38,21 +38,8 @@
private static final String SIGN_STR = "w@a!llokmet";
public static void main(String[] args) {
- 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);
+ String applyOrderInfo = TRC20ApiUtils.getApplyOrderInfo("2020111140230002");
+ System.out.println(applyOrderInfo);
}
private static void sign() {
--
Gitblit v1.9.1