xiaoyong931011
2020-07-09 f5f828b22c5d9ae19991a5e14a5090df63e41f81
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -405,18 +405,14 @@
         memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
      }
      
      MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
      memberAccountMoneyChangeEntity.setContent("提币");
      memberAccountMoneyChangeEntity.setMemberId(memberId);
      memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
      Map<String, Object> columnMaps = new HashMap<>();
      columnMaps.put("withdraw_id", selectById.getId());
      List<MemberAccountMoneyChangeEntity> selectByMap2 = memberAccountMoneyChangeMapper.selectByMap(columnMaps);
      MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = selectByMap2.get(0);
      memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_SUCCESS_INTEGER);
      memberAccountMoneyChangeEntity.setSymbol(selectById.getSymbol());
      memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
      memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
        memberAccountMoneyChangeEntity.setCreateTime(new Date());
        memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
        memberAccountMoneyChangeEntity.setUpdateTime(new Date());
      memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
      memberAccountMoneyChangeEntity.setAmount(selectById.getAmount().negate());
      memberAccountMoneyChangeMapper.updateById(memberAccountMoneyChangeEntity);
      
      selectById.setStatus(MemberCoinWithdrawEntity.IS_STATUS_Y);
      memberCoinWithdrawMapper.updateById(selectById);
@@ -454,18 +450,14 @@
      memberWalletCoinMapper.updateById(walletCoin);
      
      // 提币退款记录
      MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = new MemberAccountMoneyChangeEntity();
      memberAccountMoneyChangeEntity.setContent("提币");
      memberAccountMoneyChangeEntity.setMemberId(memberId);
      memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
      Map<String, Object> columnMaps = new HashMap<>();
      columnMaps.put("withdraw_id", selectById.getId());
      List<MemberAccountMoneyChangeEntity> selectByMap2 = memberAccountMoneyChangeMapper.selectByMap(columnMaps);
      MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity = selectByMap2.get(0);
      memberAccountMoneyChangeEntity.setStatus(MemberAccountMoneyChangeEntity.STATUS_FAIL_INTEGER);
      memberAccountMoneyChangeEntity.setSymbol(selectById.getSymbol());
      memberAccountMoneyChangeEntity.setType(MemberAccountMoneyChangeEntity.TYPE_WALLET_COIN);
      memberAccountMoneyChangeEntity.setCreateBy(selectById.getCreateBy());
        memberAccountMoneyChangeEntity.setCreateTime(new Date());
        memberAccountMoneyChangeEntity.setUpdateBy(selectById.getCreateBy());
        memberAccountMoneyChangeEntity.setUpdateTime(new Date());
      memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity);
      memberAccountMoneyChangeEntity.setAmount(selectById.getAmount());
      memberAccountMoneyChangeMapper.updateById(memberAccountMoneyChangeEntity);
      
      selectById.setStatus(MemberCoinWithdrawEntity.IS_STATUS_N);
      memberCoinWithdrawMapper.updateById(selectById);