房间小时榜相关

This commit is contained in:
2025-09-29 18:29:08 +08:00
parent 5279199cec
commit 0a2f05a928
7 changed files with 138 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ class RoomHourRanking extends Model
$profit = db::name('vs_room')->alias('a')
->join('vs_give_gift b', 'a.id = b.from_id AND b.from = 2 AND b.createtime BETWEEN '.$start_time.' AND '.$end_time, 'left')
->join('vs_room_label c', 'a.label_id = c.id','left')
->field('a.id as room_id,a.room_name,a.label_id,a.room_cover,IFNULL(sum(b.total_price), 0) as total_price,c.label_icon')
->field('a.id as room_id,a.user_id,a.room_name,a.label_id,a.room_cover,IFNULL(sum(b.total_price), 0) as total_price,c.label_icon')
->where('a.room_status', 1) // 只统计正常状态的房间
->where('a.apply_status', 2) // 只统计审核通过的房间
->where('a.type_id', '<>', 6)

View File

@@ -34,6 +34,8 @@ class UserGiftPack extends Model
const DRAW_GIFT = 7;
//巡乐会抽奖所得
const XLH_DRAW_GIFT_GET = 8;
//小时榜获得
const HOUR_RANK_GET = 9;
public static function init()
{
@@ -51,7 +53,8 @@ class UserGiftPack extends Model
self::GIFT_USE => '礼物使用',
self::FIRST_CHARGE => '首充获得',
self::DRAW_GIFT => '天降好礼获得',
self::XLH_DRAW_GIFT_GET => '巡乐会抽奖所得'
self::XLH_DRAW_GIFT_GET => '巡乐会抽奖所得',
self::HOUR_RANK_GET => '小时榜获得'
];
}

View File

@@ -50,6 +50,7 @@ class UserWallet extends Model
// 1.系统调节 2.充值 3.提现 4.金币转增(送出) 5.每日任务奖励 6.充值返利 7.购买装扮
// 8.礼盒奖励 9.房间补贴 10.购买礼物 11.收礼增加收益 12.工会补贴 13.转赠金币(接收) 14.收益兑换
// 15.首充 16.天降好礼充值 17.退出工会扣款 18.房主收益 19.主持人收益20.发布头条扣除余额,21.公会长收益,22.提现驳回或提现失败返还,23.财富等级奖励金币领取,24.删除关系扣金币
//27.小时榜获得
if($gift_type == 1){ //1金币2收益钻石
if($in_out_type == 1){//1收入
$in_out_types = [2,5,6,8,13,14,15,16,22,23,26];