Helius
2021-02-04 bf13ce8d93e4e3125ec08b32949ca7ba5f375f6c
modify
2 files modified
10 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/OrderWebsocketServiceImpl.java
@@ -772,6 +772,7 @@
     *
     * @param
     */
    @Transactional(rollbackFor = Exception.class)
    public void dealCoinOut(List<ContractHoldOrderEntity> orderList, List<OrderModel> orderModels) {
        if (CollectionUtils.isNotEmpty(orderList)) {
            Map<Long, Integer> modelMap = new HashMap<Long, Integer>();
@@ -802,7 +803,7 @@
                            bombOrder(holdOrderEntity);
                        }
                        MemberWalletContractEntity wallet = memberWalletContractService.findWalletContractByMemberIdAndSymbol(coinsOrder.getMemberId(), CoinTypeConvert.convertContractTypeToCoin(coinsOrder.getSymbol()));
                        MemberWalletContractEntity wallet = memberWalletContractService.findWalletContractByMemberIdAndSymbol(coinsOrder.getMemberId(), CoinTypeEnum.USDT.name());
                        // 流水记录 TODO
                        MemberAccountFlowEntity record = new MemberAccountFlowEntity();
@@ -863,7 +864,7 @@
                contractOrderService.save(contractOrderEntity);
                //更新用户钱包数据
                MemberWalletContractEntity usdt = memberWalletContractService.findWalletContractByMemberIdAndSymbol(memId, CoinTypeConvert.convertContractTypeToCoin(coinsOrder.getSymbol()));
                MemberWalletContractEntity usdt = memberWalletContractService.findWalletContractByMemberIdAndSymbol(memId, CoinTypeEnum.USDT.name());
                // 减去的时候用负数
                BigDecimal totalPrice = coinsOrder.getBondAmount().negate();
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -201,8 +201,6 @@
        walletContractSimulate.setWalletCode(CoinTypeEnum.USDT.name());
        memberWalletContractSimulateDao.insert(walletContractSimulate);
        for (CoinTypeEnum coinTypeEnum : CoinTypeEnum.values()) {
            //初始化合约钱包
            MemberWalletContractEntity walletContract = new MemberWalletContractEntity();
            walletContract.setMemberId(member.getId());
@@ -210,9 +208,10 @@
            walletContract.setFrozenBalance(AppContants.INIT_MONEY);
            walletContract.setTotalBalance(AppContants.INIT_MONEY);
            walletContract.setBorrowedFund(AppContants.INIT_MONEY);
            walletContract.setWalletCode(coinTypeEnum.name());
        walletContract.setWalletCode(CoinTypeEnum.USDT.name());
            memberWalletContractDao.insert(walletContract);
        for (CoinTypeEnum coinTypeEnum : CoinTypeEnum.values()) {
            // 初始化币币钱包
            MemberWalletCoinEntity walletCoin = new MemberWalletCoinEntity();
            walletCoin.setWalletCode(coinTypeEnum.name());