用户活动结束统计fixed
用户活动结束统计
This commit is contained in:
@@ -6,6 +6,7 @@ import com.accompany.sharding.vo.RoomRevenueExcelVo;
|
||||
import com.accompany.sharding.vo.RoomSerialVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -66,4 +67,8 @@ public interface GiftSendRecordMapperExpand {
|
||||
List<GiftSendRecord> listUserTotalGoldNum(@Param("uid")Long uid);
|
||||
List<GiftSendRecord> listReceiverUserTotalGoldNum();
|
||||
|
||||
GiftSendRecord sumRoomFlowByDate(@Param("roomUid")Long roomUid, @Param("beginTime")Date beginTime, @Param("endTime")Date endTime,
|
||||
@Param("goldCommonRate")BigDecimal goldCommonRate, @Param("gold24Rate")BigDecimal gold24Rate,
|
||||
@Param("goldBravoRate")BigDecimal goldBravoRate, @Param("gold25Rate")BigDecimal gold25Rate);
|
||||
|
||||
}
|
||||
|
@@ -258,4 +258,15 @@
|
||||
group by recive_uid
|
||||
</select>
|
||||
|
||||
<select id="sumRoomFlowByDate" resultType="com.accompany.sharding.model.GiftSendRecord">
|
||||
SELECT
|
||||
sum(gsr.total_diamond_num) totalGoldNum,
|
||||
sum(g.gold_price *
|
||||
IF(gsr.gift_type = 18, #{gold24Rate}, IF(gsr.gift_type = 21, #{goldBravoRate}, IF(gsr.gift_type = 22, #{gold25Rate}, #{goldCommonRate})))) totalDiamondNum
|
||||
FROM
|
||||
gift_send_record gsr
|
||||
LEFT JOIN gift g ON gsr.gift_id = g.gift_id
|
||||
where gsr.create_time >= #{beginTime} and gsr.create_time <= #{endTime} and gsr.room_uid = #{roomUid}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user