From b3c62a5c103bf6f9c3426ba75449c47bc5d33504 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 10 Nov 2020 11:06:29 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java | 24 ++++++++++++
src/main/resources/mapper/member/SrcAddressDao.xml | 13 ++++++
src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java | 7 +++
src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java | 16 ++++++++
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java | 14 +++---
5 files changed, 67 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
index b2a3813..51094c8 100644
--- a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
+++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
@@ -94,14 +94,14 @@
String hash = ethService.tokenSend(privateKey, address, NOTIONAL_POOLING_ADDRESS, usdtStr, gasPrice);
log.info("归集:{}", hash);
-// if (StrUtil.isNotBlank(hash)) {
-// // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新
-// coinCharge.setHash(hash);
-// memberCoinChargeDao.updateById(coinCharge);
-// }
+ if (StrUtil.isNotBlank(hash)) {
+ // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新
+ coinCharge.setHash(hash);
+ memberCoinChargeDao.updateById(coinCharge);
+ }
} else {
- //String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, address, ETH_FEE,gasPrice);
- //log.info("转手续费:{}", hash);
+ String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, address, ETH_FEE,gasPrice);
+ log.info("转手续费:{}", hash);
}
}
}
diff --git a/src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java b/src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java
new file mode 100644
index 0000000..c0d5a23
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java
@@ -0,0 +1,16 @@
+package com.xcong.excoin.modules.coin.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xcong.excoin.modules.coin.entity.TrcAddressEntity;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author wzy
+ * @date 2020-11-09
+ **/
+public interface TrcAddressDao extends BaseMapper<TrcAddressEntity> {
+
+ TrcAddressEntity selectSrcAddressByMemberId(@Param("memberId") Long memberId);
+
+ TrcAddressEntity selectOneSrcAddressUnUse();
+}
diff --git a/src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java b/src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java
new file mode 100644
index 0000000..326c230
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java
@@ -0,0 +1,24 @@
+package com.xcong.excoin.modules.coin.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+/**
+ * @author wzy
+ * @date 2020-11-09
+ **/
+@Data
+@TableName("trc_address")
+public class TrcAddressEntity {
+
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ private String address;
+
+ private int isUse;
+
+ private Long memberId;
+}
diff --git a/src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java b/src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java
new file mode 100644
index 0000000..4240da6
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java
@@ -0,0 +1,7 @@
+package com.xcong.excoin.quartz.job;/**
+*
+* @author wzy
+* @date 2020-11-05
+**/
+public class TRC20OrderJob {
+}
diff --git a/src/main/resources/mapper/member/SrcAddressDao.xml b/src/main/resources/mapper/member/SrcAddressDao.xml
new file mode 100644
index 0000000..a649376
--- /dev/null
+++ b/src/main/resources/mapper/member/SrcAddressDao.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.xcong.excoin.modules.coin.dao.MemberSelectSymbolsDao">
+
+ <select id="selectSymbolByMemIdAndSymbol" resultType="com.xcong.excoin.modules.member.entity.MemberSelectSymbolsEntity">
+ select id id,symbol symbol,member_id memberId from member_select_symbols where member_id = #{memberId} and symbol = #{symbol}
+ </select>
+
+ <select id="selectSymbolByMemId" resultType="com.xcong.excoin.modules.member.entity.MemberSelectSymbolsEntity">
+ select id id,symbol symbol,member_id memberId from member_select_symbols where member_id = #{memberId} GROUP BY symbol
+ </select>
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.1