家族成员列表增加财富等级排序

This commit is contained in:
tianfeng 2025-12-30 15:50:44 +08:00
parent 4b3f02ecfb
commit be52ad499c
2 changed files with 10 additions and 2 deletions

View File

@ -49,4 +49,9 @@ public class FamilyMemberExpDTO implements Serializable {
*/
private BigDecimal exp;
/**
* 消费金币.
*/
private BigDecimal consumptionGolds;
}

View File

@ -10,8 +10,10 @@
fm.sys_origin AS sysOrigin,
fm.family_id AS family_id,
fm.member_user_id AS memberUserId,
fm.member_role AS memberRole
fm.member_role AS memberRole,
IFNULL(ucl.consumption_golds, 0) AS consumptionGolds
FROM `family_member` fm
LEFT JOIN user_consumption_level ucl ON fm.member_user_id = ucl.user_id
WHERE fm.`family_id` = #{familyId}
<if test="memberUserId != null">
AND fm.member_user_id = #{memberUserId}
@ -21,7 +23,8 @@
WHEN 'ADMIN' THEN 1
WHEN 'MANAGE' THEN 2
WHEN 'MEMBER' THEN 3
END
END,
IFNULL(ucl.consumption_golds, 0) DESC
LIMIT #{start}, #{end}
</select>