| | |
| | | public List<MemberEntity> selectAllMember();
|
| | |
|
| | | List<MemberEntity> selectMemberListByReferer(@Param("list") List<String> list);
|
| | |
|
| | | Integer selectMemberTeamCnt(@Param("inviteId") String inviteId);
|
| | | }
|
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xcong.excoin.common.LoginUserUtils; |
| | | import com.xcong.excoin.common.response.Result; |
| | | import com.xcong.excoin.modules.member.dao.MemberDao; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.otc.dao.OtcReturnMoneyDao; |
| | | import com.xcong.excoin.modules.otc.dto.*; |
| | |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | IPage<TeamVo> data = otcReturnMoneyDao.selectMyTeamAmountInPage(member.getInviteId(), member.getId(), page); |
| | | BigDecimal totalAmount = otcReturnMoneyDao.selectTotalAmount(member.getId()); |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("totalCnt", data.getTotal()); |
| | | result.put("totalAmount", totalAmount); |
| | |
| | | |
| | | @ApiModelProperty(value = "金额") |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty(value = "团队人数") |
| | | private Integer cnt; |
| | | } |
| | |
| | | </foreach > |
| | | order by id desc limit 2 |
| | | </select> |
| | | |
| | | <select id="selectMemberTeamCnt" resultType="java.lang.Integer"> |
| | | select count(1) from member where find_in_set(#{inviteId}, SUBSTRING_INDEX(referer_ids, ',', 3)) |
| | | </select> |
| | | </mapper> |
| | |
| | | substring(invite_id, -4) inviteId, |
| | | case when a.referer_id = #{inviteId} then 1 |
| | | else 2 end level, |
| | | (select count(1) from member c where find_in_set(a.invite_id, SUBSTRING_INDEX(c.referer_ids, ',', 3))) cnt, |
| | | sum(IFNULL(b.amount, 0)) amount |
| | | from member a |
| | | left join otc_return_money b on b.from_member_id=a.id and b.to_member_id=#{memberId} |