房主收益为0 判断

This commit is contained in:
2025-09-26 10:33:46 +08:00
parent 90a34cc958
commit 826392fbda

View File

@@ -262,11 +262,14 @@ class GiveGift extends Model
}
//增加房主收益并记录日志
$room_owner_earningss = $room_owner_earnings - $host_earnings;
if($room_owner_earningss > 0){
$room_owner_earning = $this -> change_user_cion_or_earnings_log($room_owner,$room_owner_earningss,$from_id,2,18,'房主收益');
if(!$room_owner_earning){
Db::rollback();
return ['code' => 0, 'msg' => '房主收益失败', 'data' => null];
}
}
}else{
//增加房主收益并记录日志
$room_owner_earning = $this -> change_user_cion_or_earnings_log($room_owner,$room_owner_earnings,$from_id,2,18,'房主收益');