房间小时榜相关
This commit is contained in:
@@ -35,7 +35,7 @@ class RoomHourRanking extends Model
|
|||||||
$profit = db::name('vs_room')->alias('a')
|
$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_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')
|
->join('vs_room_label c', 'a.label_id = c.id','left')
|
||||||
->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 *'. get_system_config_value('coin_charm_exp').',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.room_status', 1) // 只统计正常状态的房间
|
||||||
->where('a.apply_status', 2) // 只统计审核通过的房间
|
->where('a.apply_status', 2) // 只统计审核通过的房间
|
||||||
->where('a.type_id', '<>', 6)
|
->where('a.type_id', '<>', 6)
|
||||||
@@ -46,6 +46,7 @@ class RoomHourRanking extends Model
|
|||||||
|
|
||||||
if($profit){
|
if($profit){
|
||||||
foreach ($profit as &$v) {
|
foreach ($profit as &$v) {
|
||||||
|
$v['total_price'] = $v['total_price'] * get_system_config_value('coin_charm_exp');
|
||||||
if($v['room_id'] > 0 && $is_open_xlh == 1){
|
if($v['room_id'] > 0 && $is_open_xlh == 1){
|
||||||
$xlh_status = model('BlindBoxTurntableGift')->get_user_xlh_info($v['room_id']);
|
$xlh_status = model('BlindBoxTurntableGift')->get_user_xlh_info($v['room_id']);
|
||||||
$v['xlh_status'] = $xlh_status['xlh_status'];
|
$v['xlh_status'] = $xlh_status['xlh_status'];
|
||||||
|
|||||||
Reference in New Issue
Block a user