zainali5120
2020-12-01 ce3b47fdf62926f80510a94f7a520dbf05267d6d
src/main/java/com/xcong/excoin/modules/blackchain/service/Impl/BlockSeriveImpl.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import com.xcong.excoin.modules.blackchain.service.*;
import com.xcong.excoin.rabbit.producer.UsdtUpdateProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@@ -30,6 +31,9 @@
    @Resource
    MemberCoinAddressDao memberMapper;
    @Resource
    private UsdtUpdateProducer usdtUpdateProducer;
    @Override
    public Result findBlockAddress(String symbol) {
        //获取用户ID
@@ -49,7 +53,7 @@
            } else {
                memberCoinAddress = memberMapper.selectBlockAddress(Long.parseLong(mId), symbol);
            }
            log.info("--->{}", memberCoinAddress);
            //log.info("--->{}", memberCoinAddress);
            if (memberCoinAddress != null) {
                map.put("address", memberCoinAddress.getAddress());
                map.put("lable", memberCoinAddress.getLabel());
@@ -178,9 +182,8 @@
                                coinAddress.setLabel(uuid);
                                memberMapper.insert(coinAddress);
                            }
                            if(!UsdtErc20UpdateService.ALL_ADDRESS_LIST.contains(address)){
                                UsdtErc20UpdateService.ALL_ADDRESS_LIST.add(address);
                            }
                           // 发送新增的地址到监听集合
                            usdtUpdateProducer.sendAddressMsg(address);
                        }
                        break;
                    case "ROC":
@@ -211,4 +214,8 @@
        return result;
    }
    public static void main(String[] args) {
        String wallet = RocService.createWallet();
        System.out.println(wallet);
    }
}