xiaoyong931011
2022-03-10 030e1cca0b8103662a182a4dbe801c063b342630
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -462,18 +462,22 @@
      BigDecimal frozen = walletCoin.getFrozenBalance().subtract(selectById.getAmount());
      walletCoin.setFrozenBalance(frozen);
      
      memberWalletCoinMapper.updateById(walletCoin);
//      memberWalletCoinMapper.updateById(walletCoin);
      
      if ("Y".equals(selectById.getIsInside())) {
         Map<String, Object> columnMap = new HashMap<>();
         columnMap.put("symbol", symbol);
         columnMap.put("address", address);
         // 如果是内部转账 则需要将币加到内部地址
         List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap);
         if(selectByMap == null || selectByMap.isEmpty()) {
         MemberEntity memberIn = memberMapper.selectMemberByAddress(address);
         if(ObjectUtils.isEmpty(memberIn)){
            return new FebsResponse().fail().message("地址有误,请拒绝!");
         }
         Long aimMemberId = selectByMap.get(0).getMemberId();
//         List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap);
//         if(selectByMap == null || selectByMap.isEmpty()) {
//            return new FebsResponse().fail().message("地址有误,请拒绝!");
//         }
         Long aimMemberId = memberIn.getId();
         MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol);
         
         BigDecimal addTotal = aimWalletCoin.getTotalBalance().add(amount);
@@ -496,6 +500,8 @@
           memberAccountMoneyChangeEntity.setUpdateTime(new Date());
         memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
      }
      memberWalletCoinMapper.updateById(walletCoin);
      
      Map<String, Object> columnMaps = new HashMap<>();
      columnMaps.put("withdraw_id", selectById.getId());