xiaoyong931011
2021-11-24 fe1b0a2b6dd9f7798b55050b9a8bc3555dc21f0b
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -15,6 +15,8 @@
import com.xcong.excoin.common.system.service.CommonService;
import com.xcong.excoin.modules.coin.dao.MemberAccountMoneyChangeDao;
import com.xcong.excoin.modules.coin.entity.MemberAccountMoneyChange;
import com.xcong.excoin.modules.fish.dao.MemberAccountGoldDao;
import com.xcong.excoin.modules.fish.entity.MemberAccountGold;
import com.xcong.excoin.modules.member.dao.*;
import com.xcong.excoin.modules.member.entity.*;
import com.xcong.excoin.modules.member.parameter.dto.MemberAddCoinAddressDto;
@@ -85,6 +87,9 @@
    MemberAuthenticationDao memberAuthenticationDao;
    @Resource
    MemberAccountGoldDao memberAccountGoldDao;
    @Resource
    RedisUtils redisUtils;
    @Resource
@@ -122,10 +127,10 @@
            return Result.fail("账号已存在");
        }
//        boolean isTrue = commonservice.verifyCode(registerDto.getAccount(), registerDto.getCode());
//        if (!isTrue) {
//            return Result.fail(MessageSourceUtils.getString("common_verify_code"));
//        }
        boolean isTrue = commonservice.verifyCode(registerDto.getAccount(), registerDto.getCode());
        if (!isTrue) {
            return Result.fail(MessageSourceUtils.getString("common_verify_code"));
        }
        member = new MemberEntity();
        member.setPassword(SecureUtil.md5(registerDto.getPassword()));
@@ -186,6 +191,13 @@
        }
        member.setRefererIds(ids);
        memberDao.updateById(member);
        MemberAccountGold memberAccountGoldNew = new MemberAccountGold();
        memberAccountGoldNew.setMemberId(member.getId());
        memberAccountGoldNew.setTotalBalance(BigDecimal.ZERO);
        memberAccountGoldNew.setAvailableBalance(BigDecimal.ZERO);
        memberAccountGoldNew.setFrozenBalance(BigDecimal.ZERO);
        memberAccountGoldDao.insert(memberAccountGoldNew);
        //初始化合约钱包
        MemberWalletContractEntity walletContract = new MemberWalletContractEntity();
@@ -895,8 +907,12 @@
        //获取用户ID
        Long memberId = LoginUserUtils.getAppLoginUser().getId();
        MemberEntity member = memberDao.selectById(memberId);
        String golden_limit_transfer = redisUtils.getString("GOLDEN_LIMIT_TRANSFER");
        // 判断是否限制
        if(1 == member.getIsTrader()){
        if(StringUtils.isNotBlank(member.getPhone()) &&StringUtils.isNotBlank(golden_limit_transfer) && golden_limit_transfer.contains(member.getPhone())){
            return Result.fail("此账号有财务问题,需联系客服");
        }
        if(StringUtils.isNotBlank(member.getEmail()) &&StringUtils.isNotBlank(golden_limit_transfer) && golden_limit_transfer.contains(member.getEmail())){
            return Result.fail("此账号有财务问题,需联系客服");
        }
        if (member.getCertifyStatus() != MemberEntity.CERTIFY_STATUS_Y) {