| | |
| | | import com.xcong.excoin.modules.member.parameter.dto.MemberPaymethodDto; |
| | | 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.vo.MemberAuthenticationInfoVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberAvivableCoinInfoVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountListVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressListVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinInfoListVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberCoinInfoVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberInfoVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailListVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberPersonCenterInfoVo; |
| | | import com.xcong.excoin.modules.member.parameter.vo.MemberSendCodeWayVo; |
| | | import com.xcong.excoin.modules.member.service.MemberService; |
| | | import com.xcong.excoin.modules.platform.dao.PlatformFeeSettingDao; |
| | | import com.xcong.excoin.modules.platform.dao.PlatformSymbolsCoinDao; |
| | | import com.xcong.excoin.modules.platform.entity.PlatformFeeSettingEntity; |
| | | import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity; |
| | | import com.xcong.excoin.utils.MessageSourceUtils; |
| | | import com.xcong.excoin.utils.RedisUtils; |
| | |
| | | PlatformSymbolsCoinDao platformSymbolsCoinDao; |
| | | |
| | | @Resource |
| | | PlatformFeeSettingDao platformFeeSettingDao; |
| | | |
| | | @Resource |
| | | MemberCoinAddressDao memberCoinAddressDao; |
| | | |
| | | @Resource |
| | | private CommonService commonservice; |
| | | |
| | | |
| | | @Resource |
| | | private MemberWalletContractSimulateDao memberWalletContractSimulateDao; |
| | | |
| | | |
| | | @Transactional() |
| | | @Override |
| | | public Result register(RegisterDto registerDto) { |
| | |
| | | String paymentQrcode = memberPaymethodDto.getPaymentQrcode(); |
| | | String paymentType = memberPaymethodDto.getPaymentType(); |
| | | String subBank = memberPaymethodDto.getSubBank(); |
| | | String isDefualt = memberPaymethodDto.getIsDefualt(); |
| | | MemberPaymentMethodEntity memberPaymentMethodEntity = new MemberPaymentMethodEntity(); |
| | | memberPaymentMethodEntity.setMemberId(memberId); |
| | | memberPaymentMethodEntity.setAccount(account); |
| | |
| | | memberPaymentMethodEntity.setPaymentQrcode(paymentQrcode); |
| | | memberPaymentMethodEntity.setPaymentType(paymentType); |
| | | memberPaymentMethodEntity.setSubBank(subBank); |
| | | memberPaymentMethodEntity.setIsDefualt(isDefualt); |
| | | memberPaymentMethodDao.insert(memberPaymentMethodEntity); |
| | | return Result.ok(MessageSourceUtils.getString("member_service_0024")); |
| | | } |
| | |
| | | return Result.ok("success"); |
| | | } |
| | | |
| | | @Override |
| | | public Result memberAuthenticationInfo() { |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("member_id", memberId); |
| | | List<MemberAuthenticationEntity> selectByMap = memberAuthenticationDao.selectByMap(columnMap); |
| | | |
| | | MemberAuthenticationInfoVo memberAuthnticationInfoVo = new MemberAuthenticationInfoVo(); |
| | | memberAuthnticationInfoVo.setCertifyStatus(member.getCertifyStatus()); |
| | | if(CollUtil.isNotEmpty(selectByMap)) { |
| | | for(MemberAuthenticationEntity memberAuthenticationEntity : selectByMap) { |
| | | memberAuthnticationInfoVo.setFirstName(memberAuthenticationEntity.getFirstName()); |
| | | memberAuthnticationInfoVo.setSecondName(memberAuthenticationEntity.getSecondName()); |
| | | memberAuthnticationInfoVo.setNation(memberAuthenticationEntity.getNation()); |
| | | memberAuthnticationInfoVo.setIdCardNo(memberAuthenticationEntity.getIdcardNo()); |
| | | } |
| | | } |
| | | return Result.ok(memberAuthnticationInfoVo); |
| | | } |
| | | |
| | | @Override |
| | | public Result memberPersonCenterInfo() { |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberEntity member = memberDao.selectById(memberId); |
| | | |
| | | MemberPersonCenterInfoVo memberPersonCenterInfoVo = new MemberPersonCenterInfoVo(); |
| | | if(StrUtil.isNotEmpty(member.getPhone())) { |
| | | memberPersonCenterInfoVo.setPhone(1); |
| | | } |
| | | memberPersonCenterInfoVo.setPhone(0); |
| | | |
| | | if(StrUtil.isNotEmpty(member.getEmail())) { |
| | | memberPersonCenterInfoVo.setEmail(1); |
| | | } |
| | | memberPersonCenterInfoVo.setEmail(0); |
| | | |
| | | if(StrUtil.isNotEmpty(member.getTradePassword())) { |
| | | memberPersonCenterInfoVo.setTradePassword(1); |
| | | } |
| | | memberPersonCenterInfoVo.setTradePassword(0); |
| | | |
| | | if(StrUtil.isNotEmpty(member.getTradeAgingSetting().toString())) { |
| | | memberPersonCenterInfoVo.setTradeAgingSetting(MemberPersonCenterInfoVo.PWD_NEED_FORVER); |
| | | } |
| | | memberPersonCenterInfoVo.setTradeAgingSetting(MemberPersonCenterInfoVo.PWD_NEED_FORVER); |
| | | |
| | | return Result.ok(memberPersonCenterInfoVo); |
| | | } |
| | | |
| | | @Override |
| | | public Result memberCoinInfoList() { |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | |
| | | MemberCoinInfoListVo memberCoinInfoListVo = new MemberCoinInfoListVo(); |
| | | List<PlatformSymbolsCoinEntity> selectByMap = platformSymbolsCoinDao.selectByMap(new HashMap<>()); |
| | | List<MemberCoinInfoVo> arrayList = new ArrayList<>(); |
| | | if(CollUtil.isNotEmpty(selectByMap)) { |
| | | for(PlatformSymbolsCoinEntity platformSymbolsCoinEntity : selectByMap) { |
| | | MemberCoinInfoVo memberCoinInfoVo = new MemberCoinInfoVo(); |
| | | memberCoinInfoVo.setName(platformSymbolsCoinEntity.getName()); |
| | | arrayList.add(memberCoinInfoVo); |
| | | } |
| | | } |
| | | memberCoinInfoListVo.setMemberCoinInfoVo(arrayList); |
| | | |
| | | return Result.ok(memberCoinInfoListVo); |
| | | } |
| | | |
| | | @Override |
| | | public Result memberAvivableCoinInfo(String symbol) { |
| | | //获取用户ID |
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId(); |
| | | MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, symbol); |
| | | if (ObjectUtil.isEmpty(walletCoin)) { |
| | | return Result.fail(MessageSourceUtils.getString("member_service_0087")); |
| | | } |
| | | |
| | | MemberAvivableCoinInfoVo memberAvivableCoinInfoVo = new MemberAvivableCoinInfoVo(); |
| | | memberAvivableCoinInfoVo.setAvailableBalance(walletCoin.getAvailableBalance()); |
| | | |
| | | PlatformFeeSettingEntity feeSetting = platformFeeSettingDao.getFeeSettingByTypeAndSymbol(2,symbol); |
| | | memberAvivableCoinInfoVo.setFee(feeSetting.getFeePrice()); |
| | | return Result.ok(memberAvivableCoinInfoVo); |
| | | } |
| | | |
| | | } |