Helius
2020-11-10 b3c62a5c103bf6f9c3426ba75449c47bc5d33504
modify
4 files added
1 files modified
74 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java 14 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java 7 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/member/SrcAddressDao.xml 13 ●●●●● patch | view | raw | blame | history
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);
                    }
                }
            }
src/main/java/com/xcong/excoin/modules/coin/dao/TrcAddressDao.java
New file
@@ -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();
}
src/main/java/com/xcong/excoin/modules/coin/entity/TrcAddressEntity.java
New file
@@ -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;
}
src/main/java/com/xcong/excoin/quartz/job/TRC20OrderJob.java
New file
@@ -0,0 +1,7 @@
package com.xcong.excoin.quartz.job;/**
*
* @author wzy
* @date 2020-11-05
**/
public class TRC20OrderJob {
}
src/main/resources/mapper/member/SrcAddressDao.xml
New file
@@ -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>