From 33c63b245cde8c5d4ac3a60b31c860cdf8fd6a22 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Fri, 14 Jun 2024 12:38:25 +0800 Subject: [PATCH] 星级矩阵 --- src/main/resources/mapper/dapp/DappAchieveTreeDao.xml | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/dapp/DappAchieveTreeDao.xml b/src/main/resources/mapper/dapp/DappAchieveTreeDao.xml index 07cc0f0..808abae 100644 --- a/src/main/resources/mapper/dapp/DappAchieveTreeDao.xml +++ b/src/main/resources/mapper/dapp/DappAchieveTreeDao.xml @@ -3,7 +3,37 @@ <mapper namespace="cc.mrbird.febs.dapp.mapper.DappAchieveTreeDao"> <select id="selectByMidNode" resultType="cc.mrbird.febs.dapp.entity.DappAchieveTreeEntity"> - select * from dapp_achieve_tree where mid_node=#{memberId} + select * from dapp_achieve_tree where mid_node=#{memberId} and valid_state=1 </select> + <select id="selectTreeList" resultType="cc.mrbird.febs.dapp.entity.DappAchieveTreeEntity"> + select a.*, b.address, b.invite_id, b.referer_id from dapp_achieve_tree a + inner join dapp_member b on a.mid_node=b.id and valid_state=1 + order by a.id + </select> + + <select id="selectTreeListV2" resultType="cc.mrbird.febs.dapp.entity.DappAchieveTreeEntity"> + select a.*, b.id fundId,b.member_id memberId from dapp_achieve_tree a + inner join dapp_fund_flow b on a.mid_node=b.id and valid_state=1 + order by a.id + </select> + + <select id="selectNewestTreeNode" resultType="cc.mrbird.febs.dapp.entity.DappAchieveTreeEntity"> + select * from dapp_achieve_tree a + order by a.id desc + limit 1 + </select> + + <select id="selectLastCountTreeNode" resultType="cc.mrbird.febs.dapp.entity.DappAchieveTreeEntity"> + select * from dapp_achieve_tree a + where valid_state=1 + order by a.id desc + limit #{count} + </select> + + <update id="updateNodeValidState"> + update dapp_achieve_tree + set valid_state=2 + where valid_state=1 + </update> </mapper> \ No newline at end of file -- Gitblit v1.9.1