主持人受益,

This commit is contained in:
2025-09-17 00:16:08 +08:00
parent 7097b08f28
commit e213070985
2 changed files with 24 additions and 5 deletions

View File

@@ -245,14 +245,14 @@ class GiveGift extends Model
}else{
$room_owner = Db::name('vs_room')->where(['id'=>$from_id,'apply_status'=>2])->value('user_id');
//计算房主收益//room_author_ratio
$room_owner_earnings = $this -> receiver_earnings($room_owner,$gift_price,99);
$room_owner_earnings = $this -> receiver_earnings($room_owner,$gift_price,99);//结果是钻石
if($room_owner_earnings > 0){
//主持人收益
//在主持位的主持人
$host_id = Db::name('vs_room_pit')->where(['room_id'=>$from_id,'pit_number'=>9])->value('user_id');
if($host_id){
//计算主持人收益
$host_earnings = $this -> receiver_earnings($host_id,$room_owner_earnings,98,$from_id);
$host_earnings = $this -> receiver_earnings($host_id,$room_owner_earnings*get_system_config_value('rmb_coin_ratio'),98,$from_id);
if($host_earnings > 0){
//增加主持人收益并记录日志
$host_earnings_earning = $this -> change_user_cion_or_earnings_log($host_id,$host_earnings,$from_id,2,19,'主持人收益');