feat(CubBonusVertexStatisMapper): 顶点会员会员接口根据可用排序
This commit is contained in:
parent
2df5a1b416
commit
35efaf0a69
|
@ -965,9 +965,17 @@
|
||||||
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
<select id="vertexList" parameterType="com.hzs.member.statis.vo.CuBonusVertexStatisVO"
|
||||||
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
resultType="com.hzs.member.statis.vo.CuBonusVertexStatisVO">
|
||||||
SELECT
|
SELECT
|
||||||
pk_id as pkVertex,
|
m.pk_id as pkVertex,
|
||||||
MEMBER_CODE as memberCode,
|
m.MEMBER_CODE as memberCode,
|
||||||
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
|
||||||
|
@ -977,8 +985,9 @@
|
||||||
AND m.pk_country = 1
|
AND m.pk_country = 1
|
||||||
AND m.pay_status = 1
|
AND m.pay_status = 1
|
||||||
<if test="pkVertex!=null">
|
<if test="pkVertex!=null">
|
||||||
AND pk_id = #{pkVertex}
|
AND m.pk_id = #{pkVertex}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY has_children DESC, m.pk_id ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询中国奖金-->
|
<!-- 查询中国奖金-->
|
||||||
|
|
Loading…
Reference in New Issue