From 356ae8326b19766ce314a07ba241ea786ebd0516 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Sat, 15 May 2021 17:53:03 +0800 Subject: [PATCH] 20210515 云顶 --- src/main/java/com/xcong/excoin/modules/yunding/vo/TeamInfoVo.java | 3 +++ src/main/java/com/xcong/excoin/modules/yunding/vo/TeamVo.java | 3 +++ src/main/java/com/xcong/excoin/modules/yunding/dao/YdOrderDao.java | 2 ++ src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java | 47 +++++++++++++++++++++++++++++++++++++---------- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/yunding/dao/YdOrderDao.java b/src/main/java/com/xcong/excoin/modules/yunding/dao/YdOrderDao.java index ee867a5..b38e0f1 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/dao/YdOrderDao.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/dao/YdOrderDao.java @@ -38,4 +38,6 @@ int selectAllPowerByMemberIdAndElse(@Param("inviteId")String inviteId); IPage<TeamInfoVo> getTeamInfoList(Page<TeamInfoVo> page, @Param("record")MemberEntity memberEntity); + + List<MemberEntity> selectMemberByInviteId(@Param("inviteId")String inviteId); } diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java index dd1a52a..074e5a6 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/YunDingServiceImpl.java @@ -610,21 +610,49 @@ * */ TeamVo teamVo = new TeamVo(); +// //团队总人数 +// int memberNum = 0; +// //直接下级 +// QueryWrapper<MemberEntity> objectQueryWrapper = new QueryWrapper<>(); +// objectQueryWrapper.eq("referer_id",memberEntity.getInviteId()); +// List<MemberEntity> memberEntities = memberDao.selectList(objectQueryWrapper); +// if(CollUtil.isNotEmpty(memberEntities)){ +// memberNum = memberEntities.size(); +// } +// teamVo.setMemberNum(memberNum); +// +// //总购买数 +// int allPower = ydOrderDao.selectAllPowerByMemberIdAndElse(memberEntity.getInviteId()); +// teamVo.setAllPower(allPower); +// +// //详细列表 +// Page<TeamInfoVo> page = new Page<>(teamInfoDto.getPageNum(), teamInfoDto.getPageSize()); +// IPage<TeamInfoVo> teamInfoVos = ydOrderDao.getTeamInfoList(page, memberEntity); +// List<TeamInfoVo> records = teamInfoVos.getRecords(); +// if(CollUtil.isNotEmpty(records)){ +// for(TeamInfoVo teamInfoVo : records){ +// String phone = teamInfoVo.getPhone(); +// if(StrUtil.isNotEmpty(phone)){ +// teamInfoVo.setPhone(StrUtil.subSufByLength(phone,4)); +// } +// } +// } +// teamVo.setTeamInfoVos(records); //团队总人数 int memberNum = 0; + String inviteId = memberEntity.getInviteId(); + List<MemberEntity> memberEntityList = ydOrderDao.selectMemberByInviteId(inviteId); + if(CollUtil.isNotEmpty(memberEntityList)){ + memberNum = memberEntityList.size(); + } + teamVo.setMemberNum(memberNum); + //购买总算力 + int allPower = ydOrderDao.selectAllPowerByMemberIdAndElse(inviteId); + teamVo.setAllPower(allPower); //直接下级 QueryWrapper<MemberEntity> objectQueryWrapper = new QueryWrapper<>(); objectQueryWrapper.eq("referer_id",memberEntity.getInviteId()); List<MemberEntity> memberEntities = memberDao.selectList(objectQueryWrapper); - if(CollUtil.isNotEmpty(memberEntities)){ - memberNum = memberEntities.size(); - } - teamVo.setMemberNum(memberNum); - - //总购买数 - int allPower = ydOrderDao.selectAllPowerByMemberIdAndElse(memberEntity.getInviteId()); - teamVo.setAllPower(allPower); - //详细列表 Page<TeamInfoVo> page = new Page<>(teamInfoDto.getPageNum(), teamInfoDto.getPageSize()); IPage<TeamInfoVo> teamInfoVos = ydOrderDao.getTeamInfoList(page, memberEntity); @@ -637,7 +665,6 @@ } } } - teamVo.setTeamInfoVos(records); return Result.ok(teamVo); } diff --git a/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamInfoVo.java b/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamInfoVo.java index 3a31437..84abe87 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamInfoVo.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamInfoVo.java @@ -12,6 +12,9 @@ @ApiModelProperty("账号") private String phone; + @ApiModelProperty("人数") + private Integer memberNum; + @ApiModelProperty("购买算力") private Integer powerNum; } diff --git a/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamVo.java b/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamVo.java index a5943dc..5aca84d 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamVo.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/vo/TeamVo.java @@ -13,6 +13,9 @@ @ApiModelProperty("团队人数") private Integer memberNum; + @ApiModelProperty("团队业绩") + private Integer allUSDT; + @ApiModelProperty("购买总算力") private Integer allPower; -- Gitblit v1.9.1