| | |
| | | import com.xcong.excoin.common.configure.FebsConfigure; |
| | | import com.xcong.excoin.common.entity.FebsResponse; |
| | | import com.xcong.excoin.common.entity.QueryRequest; |
| | | import com.xcong.excoin.common.exception.GlobalException; |
| | | import com.xcong.excoin.modules.Sms106Send; |
| | | import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto; |
| | | import com.xcong.excoin.modules.member.entity.AgentFriendRelationEntity; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) { |
| | | |
| | | MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id); |
| | |
| | | columnMap.put("address", address); |
| | | // 如果是内部转账 则需要将币加到内部地址 |
| | | List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap); |
| | | if(selectByMap == null || selectByMap.isEmpty()) { |
| | | return new FebsResponse().message("地址有误,请拒绝!"); |
| | | Long aimMemberId = null; |
| | | if(CollUtil.isEmpty(selectByMap)) { |
| | | // return new FebsResponse().message("地址有误,请拒绝!"); |
| | | // throw new GlobalException("地址有误,请拒绝!"); |
| | | MemberEntity memberEntity = memberMapper.selectMemberInfoByQueryKey(address); |
| | | if (memberEntity == null) { |
| | | throw new GlobalException("地址有误或用户不存在,请拒绝!"); |
| | | } |
| | | Long aimMemberId = selectByMap.get(0).getMemberId(); |
| | | |
| | | aimMemberId = memberEntity.getId(); |
| | | } else { |
| | | aimMemberId = selectByMap.get(0).getMemberId(); |
| | | } |
| | | MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol); |
| | | |
| | | BigDecimal addTotal = aimWalletCoin.getTotalBalance().add(selectById.getAmount()); |