充值排行处理分页排序不稳定的情况
This commit is contained in:
parent
70b1dba4b1
commit
d3bf87c5fc
@ -14,14 +14,15 @@
|
|||||||
<select id="pageRechargeRank" resultType="com.red.circle.other.infra.database.rds.dto.activity.ActivityRechargeRankDTO">
|
<select id="pageRechargeRank" resultType="com.red.circle.other.infra.database.rds.dto.activity.ActivityRechargeRankDTO">
|
||||||
SELECT
|
SELECT
|
||||||
user_id AS userId,
|
user_id AS userId,
|
||||||
SUM(amount) AS totalAmount
|
SUM(amount) AS totalAmount,
|
||||||
|
MIN(create_time) AS firstTime
|
||||||
FROM user_activity_recharge
|
FROM user_activity_recharge
|
||||||
WHERE activity_id = #{activityId}
|
WHERE activity_id = #{activityId}
|
||||||
<if test="rechargeType != null and rechargeType != ''">
|
<if test="rechargeType != null and rechargeType != ''">
|
||||||
AND recharge_type = #{rechargeType}
|
AND recharge_type = #{rechargeType}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY user_id
|
GROUP BY user_id
|
||||||
ORDER BY totalAmount DESC
|
ORDER BY totalAmount DESC, firstTime
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getUserTotalAmount" resultType="java.math.BigDecimal">
|
<select id="getUserTotalAmount" resultType="java.math.BigDecimal">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user