| | |
| | | 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); |
| | |
| | | memberAccountMoneyChangeMapper.insert(memberAccountMoneyChangeEntity); |
| | | } |
| | | |
| | | memberWalletCoinMapper.updateById(walletCoin); |
| | | |
| | | Map<String, Object> columnMaps = new HashMap<>(); |
| | | columnMaps.put("withdraw_id", selectById.getId()); |
| | | List<MemberAccountMoneyChangeEntity> selectByMap2 = memberAccountMoneyChangeMapper.selectByMap(columnMaps); |