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