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

This commit is contained in:
woody 2025-05-20 09:26:52 +08:00 committed by cabbage
parent 3b5ee0d526
commit f31e6c6a6a
1 changed files with 2 additions and 10 deletions

View File

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