周星榜-meRankVo-从db获取值

This commit is contained in:
khalil
2025-04-18 18:59:47 +08:00
parent 329b79d420
commit 68c1f407d0
3 changed files with 54 additions and 5 deletions

View File

@@ -52,6 +52,17 @@ public interface GiftSendRecordMapperExpand {
@Param("endDate") Date endDate,
@Param("partitionId") Integer partitionId);
Long getWeekStarCharmScore(@Param("uid")Long uid,
@Param("giftIdList") List<Integer> giftIdList,
@Param("startDate") Date beginDate,
@Param("endDate") Date endDate);
Long getWeekStarLevelScore(@Param("uid")Long uid,
@Param("giftIdList") List<Integer> giftIdList,
@Param("startDate") Date beginDate,
@Param("endDate") Date endDate);
List<GiftSendRecord> listUserTotalGoldNum(@Param("uid")Long uid);
List<GiftSendRecord> listReceiverUserTotalGoldNum();

View File

@@ -220,6 +220,29 @@
GROUP BY gsr.uid
</select>
<select id="getWeekStarCharmScore" resultType="java.lang.Long">
select sum(gsr.total_gold_num) as total_gold_num
from gift_send_record gsr
where gsr.create_time BETWEEN #{startDate} and #{endDate}
and gsr.recive_uid = #{uid}
and gsr.gift_id in
<foreach collection="giftIdList" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</select>
<select id="getWeekStarLevelScore" resultType="java.lang.Long">
select sum(gsr.total_gold_num) as total_gold_num
from gift_send_record gsr
where gsr.create_time BETWEEN #{startDate} and #{endDate}
and gsr.recive_uid = #{uid}
and gsr.gift_id in
<foreach collection="giftIdList" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
GROUP BY gsr.uid
</select>
<select id="listUserTotalGoldNum" resultType="com.accompany.sharding.model.GiftSendRecord">
select uid, sum(total_gold_num) `total_gold_num` from gift_send_record gsr
where gsr.create_time >= '2024-04-23 00:00:00'