Helius
2021-03-26 071b6afa2e5d03fe2375f48499041e1ae415509b
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -13,6 +13,7 @@
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;
@@ -488,7 +489,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor = Exception.class)
   public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) {
      
      MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id);
@@ -516,10 +517,19 @@
         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("地址有误或用户不存在,请拒绝!");
            }
            aimMemberId = memberEntity.getId();
         } else {
            aimMemberId = selectByMap.get(0).getMemberId();
         }
         Long aimMemberId = selectByMap.get(0).getMemberId();
         MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol);
         
         BigDecimal addTotal = aimWalletCoin.getTotalBalance().add(selectById.getAmount());