feat(CubBonusVertexStatisMapper-Bonus): 顶点会员查询sql逻辑变更
This commit is contained in:
parent
3b5ee0d526
commit
f31e6c6a6a
|
@ -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>
|
||||
|
||||
<!-- 查询中国奖金-->
|
||||
|
|
Loading…
Reference in New Issue