Helius
2020-11-03 e691bc7820d1fc7fdb2519ea6ebdedd2b464b91d
modify
2 files added
5 files modified
202 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinAddressDao.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/entity/TdCoinWallet.java 73 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 3 ●●●● patch | view | raw | blame | history
src/main/resources/application-coin.yml 114 ●●●●● patch | view | raw | blame | history
src/main/resources/application-prod.yml 2 ●●● patch | view | raw | blame | history
src/main/resources/application.yml 2 ●●● patch | view | raw | blame | history
src/main/resources/mapper/member/MemberCoinAddressDao.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/dao/MemberCoinAddressDao.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.xcong.excoin.modules.member.entity.TdCoinWallet;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -25,4 +26,6 @@
    List<String> selectAllSymbolAddress(@Param("symbol")String symbol,@Param("tag") String tag);
    TdCoinWallet selectTdCoinWalletByAddress(@Param("address") String address, @Param("symbol") String symbol);
}
src/main/java/com/xcong/excoin/modules/member/entity/TdCoinWallet.java
New file
@@ -0,0 +1,73 @@
package com.xcong.excoin.modules.member.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
/**
 * 会员资产表 Entity
 *
 * @author MrBird
 * @date 2020-09-26 19:21:08
 */
@Data
@TableName("td_coin_wallet")
public class TdCoinWallet {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 会员ID
     */
    @TableField("mem_id")
    private Long memId;
    /**
     * 地址
     */
    @TableField("address")
    private String address;
    /**
     * 币种
     */
    @TableField("symbol")
    private String symbol;
    /**
     * 私钥
     */
    @TableField("private_key")
    private String privateKey;
    /**
     * 币种细类
     */
    @TableField("tag")
    private String tag;
    /**
     * 用户标识
     */
    @TableField("mem_code")
    private String memCode;
    /**
     * 可用余额
     */
    @TableField("available_balance")
    private BigDecimal availableBalance;
    /**
     * 冻结金额
     */
    @TableField("frozen_balance")
    private BigDecimal frozenBalance;
}
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -922,7 +922,8 @@
                columnMap.put("address", memberSubmitCoinApplyDto.getAddress());
                columnMap.put("is_biyict", MemberCoinAddressEntity.IS_BIYICT_YES);
                List<MemberCoinAddressEntity> selectByMap = memberCoinAddressDao.selectByMap(columnMap);
                if (CollUtil.isEmpty(selectByMap)) {
                TdCoinWallet tdCoinWallet = memberCoinAddressDao.selectTdCoinWalletByAddress(memberSubmitCoinApplyDto.getAddress(), CoinTypeEnum.USDT.name());
                if (CollUtil.isEmpty(selectByMap) && tdCoinWallet == null) {
                    memberCoinWithdrawEntity.setIsInside(MemberCoinWithdrawEntity.ISINSIDE_NO);
                } else {
                    memberCoinWithdrawEntity.setIsInside(MemberCoinWithdrawEntity.ISINSIDE_YES);
src/main/resources/application-coin.yml
New file
@@ -0,0 +1,114 @@
server:
  port: 8888
  servlet:
    context-path: /
spring:
  profiles:
    active: dayline
  datasource:
    url: jdbc:mysql://180.215.221.145:3306/db_pilot?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8
    username: pilot
    password: pilot123!@#
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: ${spring_datasource_druid_initial_size:10}
      max-active: ${spring_datasource_druid_max_active:20}
      min-idle: ${spring_datasource_druid_min_idle:3}
      #配置获取连接等待超时的时间
      max-wait: 60000
      pool-prepared-statements: true
      max-pool-prepared-statement-per-connection-size: 20
      validation-query: SELECT 'x'
      test-on-borrow: true
      test-on-return: true
      test-while-idle: true
      #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      time-between-eviction-runs-millis: 60000
      #配置一个连接在池中最小生存的时间,单位是毫秒
      min-evictable-idle-time-millis: 300000
      #spring.datasource.druid.max-evguide.ftlictable-idle-time-millis=
      filters: stat,wall
      stat-view-servlet:
        # 默认true 内置监控页面首页/druid/index.html
        enabled: true
        url-pattern: /druid/*
        # 允许清空统计数据
        reset-enable: true
        login-username: root
        login-password: 123456
        # IP白名单 多个逗号分隔
        allow: ${spring_datasource_stat_view_servlet_allow:}
        # IP黑名单
        deny: ${spring_datasource_stat_view_servlet_deny:}
  ## 国际化配置
  messages:
    basename: i18n/messages
  ## redis配置
  redis:
    ## Redis数据库索引(默认为0)
    database: 0
    ## Redis服务器地址
    host: 180.215.221.145
    ## Redis服务器连接端口
    port: 6379
    ## Redis服务器连接密码(默认为空)
    password: pilot123!@#
    jedis:
      pool:
        ## 连接池最大连接数(使用负值表示没有限制)
        #spring.redis.pool.max-active=8
        max-active: 300
        ## 连接池最大阻塞等待时间(使用负值表示没有限制)
        #spring.redis.pool.max-wait=-1
        max-wait: -1
        ## 连接池中的最大空闲连接
        #spring.redis.pool.max-idle=8
        max-idle: 100
        ## 连接池中的最小空闲连接
        #spring.redis.pool.min-idle=0
        min-idle: 8
    ## 连接超时时间(毫秒)
    timeout: 30000
  rabbitmq:
    host: 27.124.4.94
    port: 5672
    username: pilot
    password: pilot123
    publisher-confirm-type: correlated
#custom:
#  rabbitmq:
#    host: 120.27.238.55
#    port: 5672
#    username: ct_rabbit
#    password: 123456
mybatis-plus:
  mapper-locations: classpath:mapper/**/*.xml
app:
  debug: false
  redis_expire: 3000
  kline-update-job: false
  newest-price-update-job: false
  exchange-trade: false
  day-line: false
  other-job: false
  loop-job: false
  rabbit-consumer: false
  block-job: true
aliyun:
  oss:
    end-point: https://oss-cn-hangzhou.aliyuncs.com
    bucket-name: https://excoin.oss-cn-hangzhou.aliyuncs.com
    access-key-id: LTAI4G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VkU2FYQbSAd2A6app4uRO+BkZu9dSjh14m+oXMnV2HzAN2rRnjA==
src/main/resources/application-prod.yml
@@ -100,7 +100,7 @@
  other-job: true
  loop-job: false
  rabbit-consumer: false
  block-job: true
  block-job: false
aliyun:
  oss:
src/main/resources/application.yml
@@ -95,7 +95,7 @@
  redis_expire: 3000
  kline-update-job: false
  newest-price-update-job: false
  exchange-trade: true
  exchange-trade: false
  day-line: false
  other-job: false
  loop-job: false
src/main/resources/mapper/member/MemberCoinAddressDao.xml
@@ -88,4 +88,9 @@
            and tag = #{tag}
        </if>
    </select>
    <select id="selectTdCoinWalletByAddress" resultType="com.xcong.excoin.modules.member.entity.TdCoinWallet">
        select * from td_coin_wallet
        where address=#{address} and symbol=#{symbol}
    </select>
</mapper>