feat(CubBonusVertexStatisMapper-Bonus): 顶点会员查询sql逻辑变更

This commit is contained in:
woody 2025-05-20 09:26:52 +08:00
parent c2b67b9680
commit 22d6b20277
1 changed files with 2 additions and 10 deletions

View File

@ -967,15 +967,7 @@
SELECT
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
m.MEMBER_NAME as memberName
FROM
cu_member m
WHERE
@ -987,7 +979,7 @@
<if test="pkVertex!=null">
AND m.pk_id = #{pkVertex}
</if>
ORDER BY has_children DESC, m.pk_id ASC
ORDER BY m.pk_id ASC
</select>
<!-- 查询中国奖金-->