From be9208db35144a6939fa338709168cf7549e86c6 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 26 Aug 2022 18:31:50 +0800
Subject: [PATCH] 20220822
---
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 49 insertions(+), 1 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
index 7b8589a..729b8a0 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -7,6 +7,8 @@
import cc.mrbird.febs.common.enumerates.MoneyFlowTypeEnum;
import cc.mrbird.febs.common.exception.FebsException;
import cc.mrbird.febs.common.utils.*;
+import cc.mrbird.febs.mall.conversion.MallGoodsConversion;
+import cc.mrbird.febs.mall.conversion.MallMemberBankConversion;
import cc.mrbird.febs.mall.conversion.MallMemberConversion;
import cc.mrbird.febs.mall.conversion.MallShopApplyConversion;
import cc.mrbird.febs.mall.dto.*;
@@ -58,6 +60,7 @@
private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
private final MallShopApplyMapper mallShopApplyMapper;
private final MallRegisterAppealMapper mallRegisterAppealMapper;
+ private final MallMemberBankMapper mallMemberBankMapper;
@Value("${spring.profiles.active}")
@@ -320,7 +323,7 @@
myTeamVo.setTeam(list);
myTeamVo.setMyAchieve(this.baseMapper.selectAchieveByMemberId(mallMember.getInviteId(), 1));
myTeamVo.setMyTeamAchieve(this.baseMapper.selectAchieveByMemberId(mallMember.getInviteId(), 2));
- myTeamVo.setMyTeamCnt(list.size());
+ myTeamVo.setMyTeamCnt(this.baseMapper.selectAllChildAgentListByInviteId(mallMember.getInviteId()).size());
return new FebsResponse().success().data(myTeamVo);
}
@@ -542,4 +545,49 @@
}
return MallShopApplyConversion.INSTANCE.entitiesToVOs(list);
}
+
+ @Override
+ @Transactional
+ public FebsResponse addMemberBank(AddMemberBankDto addMemberBankDto) {
+ MallMember member = LoginUserUtil.getLoginUser();
+ MallMemberBank mallMemberBank = MallMemberBankConversion.INSTANCE.dtoToentity(addMemberBankDto);
+ mallMemberBank.setMemberId(member.getId());
+ mallMemberBankMapper.insert(mallMemberBank);
+ return new FebsResponse().success();
+ }
+
+ @Override
+ public FebsResponse findMemberBankList(MemberBankListDto memberBankListDto) {
+ Page<MemberBankListVo> page = new Page<>(memberBankListDto.getPageNum(), memberBankListDto.getPageSize());
+ IPage<MemberBankListVo> pageResult = mallMemberBankMapper.findMemberBankListInPage(memberBankListDto, page);
+ return new FebsResponse().success().data(pageResult);
+ }
+
+ @Override
+ public FebsResponse findBankDetailsById(Long id) {
+ MallMemberBank mallMemberBank = mallMemberBankMapper.selectById(id);
+ MemberBankListVo memberBankListVo = MallMemberBankConversion.INSTANCE.entityToVo(mallMemberBank);
+ return new FebsResponse().success().data(memberBankListVo);
+ }
+
+ @Override
+ @Transactional
+ public FebsResponse updateMemberBank(UpdateMemberBankDto updateMemberBankDto) {
+ Long id = updateMemberBankDto.getId();
+ MallMemberBank mallMemberBank = mallMemberBankMapper.selectById(id);
+ mallMemberBank.setName(updateMemberBankDto.getName());
+ mallMemberBank.setIdType(updateMemberBankDto.getIdType());
+ mallMemberBank.setIdCardNum(updateMemberBankDto.getIdCardNum());
+ mallMemberBank.setBankNo(updateMemberBankDto.getBankNo());
+ mallMemberBank.setPhone(updateMemberBankDto.getPhone());
+ mallMemberBankMapper.updateById(mallMemberBank);
+ return new FebsResponse().success();
+ }
+
+ @Override
+ @Transactional
+ public FebsResponse delMemberBank(Long id) {
+ mallMemberBankMapper.deleteById(id);
+ return new FebsResponse().success();
+ }
}
--
Gitblit v1.9.1