房间日流水bugfixed

This commit is contained in:
2025-10-09 11:05:48 +08:00
parent 25f6c3311e
commit ec51e1f36d

View File

@@ -18,7 +18,7 @@
reward.reward_gold rewardGold,
au.username operator,
pi.`desc` partitionIdDesc,
if(reward.id is null, 0, 1) `status`,
if(reward.id is null, if(rrr.room_uid is null, 0, 1), 1) `status`,
reward.create_time createTime
FROM
room_day_diamond_num rn
@@ -32,6 +32,9 @@
left join region_info ri on u.region_id = ri.id
left join admin_user au on au.id = reward.admin_id
left join partition_info pi on rn.partition_id = pi.id
left join (select partition_id, room_uid, stat_date, sum(reward_gold), reward_gold
from room_day_diamond_reward_recv_record GROUP BY partition_id,room_uid,stat_date) rrr
on rn.partition_id = rrr.partition_id and rn.room_uid = rrr.room_uid and rn.stat_date = rrr.stat_date
<where>
<if test="partitionId != null and partitionId != 0">
and rn.partition_id = #{partitionId}
@@ -50,10 +53,10 @@
</if>
<choose>
<when test="status != null and status == 0">
and reward.id is null
and reward.id is null and rrr.room_uid is null
</when>
<when test="status != null and (status == 1)">
and reward.id is not null
<when test="status != null and status == 1">
and (reward.id is not null or rrr.room_uid is not null)
</when>
<when test="status != null and status == 2">
and rn.stat_date = #{todayDayDate}