From 89b7fb1d316cfce7eb98a27c8d668da493933f7f Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 25 Feb 2022 16:29:07 +0800
Subject: [PATCH] 20222223
---
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
index 08c13dd..a6addc9 100644
--- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -5,6 +5,8 @@
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;
@@ -14,21 +16,13 @@
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;
@@ -77,6 +71,9 @@
@Resource
private MemberWalletCoinDao memberWalletCoinDao;
+
+ @Resource
+ private ZhiYaDao zhiYaDao;
@Resource
private MemberLevelRateDao memberLevelRateDao;
@@ -218,6 +215,14 @@
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();
@@ -1020,6 +1025,19 @@
}
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);
+ }
}
--
Gitblit v1.9.1