| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.xcong.excoin.common.LoginUserUtils; |
| | | import com.xcong.excoin.common.contants.AppContants; |
| | |
| | | import com.xcong.excoin.common.system.dto.RegisterDto; |
| | | import com.xcong.excoin.common.system.service.CommonService; |
| | | import com.xcong.excoin.modules.coin.dao.MemberAccountMoneyChangeDao; |
| | | import com.xcong.excoin.modules.coin.dao.ZhiYaDao; |
| | | import com.xcong.excoin.modules.coin.entity.MemberAccountMoneyChange; |
| | | import com.xcong.excoin.modules.coin.entity.ZhiYaEntity; |
| | | import com.xcong.excoin.modules.coin.parameter.vo.ZhiyaInfoVo; |
| | | import com.xcong.excoin.modules.member.dao.*; |
| | | import com.xcong.excoin.modules.member.entity.*; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberAddCoinAddressDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberAuthenticationDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberBindEmailDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberBindPhoneDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberDelCoinAddressDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberDelPaymethodDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberForgetPwdDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberPaymethodDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberSubmitCoinApplyDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberUpdatePwdDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradePwdDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradersPwdTimeDto; |
| | | import com.xcong.excoin.modules.member.parameter.dto.*; |
| | | import com.xcong.excoin.modules.member.parameter.vo.*; |
| | | import com.xcong.excoin.modules.member.service.MemberService; |
| | | import com.xcong.excoin.modules.platform.dao.PlatformFeeSettingDao; |
| | |
| | | |
| | | @Resource |
| | | private MemberWalletCoinDao memberWalletCoinDao; |
| | | |
| | | @Resource |
| | | private ZhiYaDao zhiYaDao; |
| | | |
| | | @Resource |
| | | private MemberLevelRateDao memberLevelRateDao; |
| | |
| | | walletCoin.setBorrowedFund(AppContants.INIT_MONEY); |
| | | memberWalletCoinDao.insert(walletCoin); |
| | | } |
| | | |
| | | //初始化质押 |
| | | ZhiYaEntity zhiYaEntity = new ZhiYaEntity(); |
| | | zhiYaEntity.setMemberId(member.getId()); |
| | | zhiYaEntity.setAvailableBalance(AppContants.INIT_MONEY); |
| | | zhiYaEntity.setFrozenBalance(AppContants.INIT_MONEY); |
| | | zhiYaEntity.setTotalBalance(AppContants.INIT_MONEY); |
| | | zhiYaDao.insert(zhiYaEntity); |
| | | |
| | | // 初始化代理佣金钱包 |
| | | MemberWalletAgentEntity walletAgent = new MemberWalletAgentEntity(); |
| | |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | |
| | | if (ObjectUtil.isNotEmpty(member)) { |
| | | if (!commonservice.verifyCode(phone, code)) { |
| | | if (!commonservice.mutiVerifyCode(member.getEmail(), memberBindPhoneDto.getOtherCode(), phone, code)) { |
| | | return Result.fail(MessageSourceUtils.getString("member_service_0013")); |
| | | } |
| | | // 验证邮箱验证码 |
| | | // if (!commonservice.verifyCode(member.getEmail(), memberBindPhoneDto.getOtherCode())) { |
| | | // return Result.fail("邮箱"+MessageSourceUtils.getString("member_service_0013")); |
| | | // } |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("phone", phone); |
| | | List<MemberEntity> selectByMap = memberDao.selectByMap(columnMap); |
| | |
| | | String code = memberBindEmailDto.getCode(); |
| | | |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | boolean flag = commonservice.verifyCode(email, code); |
| | | boolean flag = commonservice.mutiVerifyCode(email, code, member.getPhone(), memberBindEmailDto.getOtherCode()); |
| | | // boolean flag2 = commonservice.verifyCode(member.getPhone(), memberBindEmailDto.getOtherCode()); |
| | | if(!flag){ |
| | | return Result.fail(MessageSourceUtils.getString("member_service_0013")); |
| | | } |
| | | // if(!flag2){ |
| | | // return Result.fail("手机"+MessageSourceUtils.getString("member_service_0013")); |
| | | // } |
| | | if (ObjectUtil.isNotEmpty(member)) { |
| | | if (flag) { |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | String golden_limit_transfer = redisUtils.getString("GOLDEN_LIMIT_TRANSFER"); |
| | | // 判断是否限制 |
| | | 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) { |
| | | return Result.fail(MessageSourceUtils.getString("member_service_0077")); |
| | | } |
| | |
| | | } |
| | | return Result.ok(arrayList); |
| | | } |
| | | |
| | | @Override |
| | | public Result memberTeam(MemberTeamRecordsPageDto memberTeamRecordsPageDto) { |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | Page<MemberTeamVo> page = new Page<>(memberTeamRecordsPageDto.getPageNum(), memberTeamRecordsPageDto.getPageSize()); |
| | | MemberEntity memberEntity = new MemberEntity(); |
| | | memberEntity.setId(memberId); |
| | | memberEntity.setInviteId(member.getInviteId()); |
| | | IPage<MemberTeamVo> lists = memberDao.selectAllTeamByInviteIdInPage(page, memberEntity); |
| | | return Result.ok(lists); |
| | | } |
| | | } |
| | | |
| | | |