| | |
| | | |
| | | <select id="selectMatrixTreeByTopNode" resultType="cc.mrbird.febs.dapp.entity.DappAchieveMemberTreeEntity"> |
| | | select * from dapp_achieve_member_tree |
| | | where top_node=#{memberId} and has_money=1 |
| | | where top_node=#{memberId} |
| | | <if test="hasMoney != null"> |
| | | and has_money=#{hasMoney} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectNodeByDeep" resultType="cc.mrbird.febs.dapp.entity.DappAchieveMemberTreeEntity"> |
| | | select * from dapp_achieve_member_tree |
| | | where tree_node=#{memberId} and deep=#{deep} |
| | | select a.*, b.invite_id, b.address from dapp_achieve_member_tree a, dapp_member b |
| | | where a.tree_node=#{memberId} and a.deep=#{deep} and a.tree_node=b.id |
| | | </select> |
| | | |
| | | <select id="resetMatrixTree" resultType="java.lang.Integer"> |
| | | <select id="selectMatrixChildNode" resultType="cc.mrbird.febs.dapp.entity.DappAchieveMemberTreeEntity"> |
| | | select a.*, b.invite_id, b.address from dapp_achieve_member_tree a, , dapp_member b |
| | | where a.top_node=#{topNode} and a.parent_node=#{parentNode} and a.tree_node=b.id |
| | | </select> |
| | | |
| | | <update id="resetMatrixTree"> |
| | | update dapp_achieve_member_tree |
| | | set has_money=2 |
| | | where top_node=#{memberId} and deep in (2,3) |
| | | </select> |
| | | </update> |
| | | |
| | | <select id="reentryMoney" resultType="java.lang.Integer"> |
| | | <update id="reentryMoney"> |
| | | update dapp_achieve_member_tree |
| | | set has_money=1 |
| | | where tree_node=#{memberId} |
| | | </select> |
| | | </update> |
| | | </mapper> |