feat(CubBonusVertexStatisMapper): 顶点会员会员接口根据可用排序

This commit is contained in:
woody 2025-05-20 08:58:52 +08:00 committed by cabbage
parent 2df5a1b416
commit 35efaf0a69
1 changed files with 13 additions and 4 deletions

View File

@ -965,9 +965,17 @@
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
SELECT
pk_id as pkVertex,
MEMBER_CODE as memberCode,
MEMBER_NAME as memberName
m.pk_id as pkVertex,
m.MEMBER_CODE as memberCode,
m.MEMBER_NAME as memberName,
CASE
WHEN EXISTS (
SELECT 1
FROM cu_member child
WHERE child.pk_place_parent = m.pk_id
) THEN 1
ELSE 0
END as has_children
FROM
cu_member m
WHERE
@ -977,8 +985,9 @@
AND m.pk_country = 1
AND m.pay_status = 1
<if test="pkVertex!=null">
AND pk_id = #{pkVertex}
AND m.pk_id = #{pkVertex}
</if>
ORDER BY has_children DESC, m.pk_id ASC
</select>
<!-- 查询中国奖金-->