国庆更新代码
This commit is contained in:
@@ -282,6 +282,13 @@ class GiveGift extends Model
|
||||
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,'房主收益');
|
||||
if(!$room_owner_earning){
|
||||
Db::rollback();
|
||||
return ['code' => 0, 'msg' => '房主收益失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,7 +317,9 @@ class GiveGift extends Model
|
||||
//平台收益 = 总金额 - 收礼人收益 - 房主收益 - 工会长收益
|
||||
$app_ratio = 100 - $ratio - $configs['room_author_ratio'] - $guid_ratio;
|
||||
$app_earning = coin_earning($gv['gift_price'], $app_ratio);
|
||||
$gift_rate = $this->change_give_gift_profit($gv['give_gift_id'], $ratio, $receiver_earnings, $configs['room_author_ratio'], $room_owner_earnings, $app_ratio, $app_earning);
|
||||
$receiver_earningss = $this -> receiver_earnings($to_id,$gv['gift_price'],$from_type);
|
||||
$room_owner_earningss = $this -> receiver_earnings($room_owner,$gv['gift_price'],99);//结果是钻石
|
||||
$gift_rate = $this->change_give_gift_profit($gv['give_gift_id'], $ratio, $receiver_earningss, $configs['room_author_ratio'], $room_owner_earningss, $app_ratio, $app_earning);
|
||||
if (!$gift_rate) {
|
||||
Db::rollback();
|
||||
return ['code' => 0, 'msg' => '礼物记录失败', 'data' => null];
|
||||
@@ -722,9 +731,15 @@ class GiveGift extends Model
|
||||
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,'房主收益');
|
||||
if(!$room_owner_earning){
|
||||
return ['code' => 0, 'msg' => '房主收益失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($gift_info['label'] == 2){
|
||||
foreach ($gift_box as $gv) {
|
||||
//记录送礼利率和各方收益
|
||||
@@ -750,8 +765,11 @@ class GiveGift extends Model
|
||||
//平台收益 = 总金额 - 收礼人收益 - 房主收益 - 工会长收益
|
||||
$app_ratio = 100 - $ratio - $configs['room_author_ratio'] - $guid_ratio;
|
||||
$app_earning = coin_earning($gv['gift_price'], $app_ratio);
|
||||
$gift_rate = $this->change_give_gift_profit($gv['give_gift_id'], $ratio, $receiver_earnings, $configs['room_author_ratio'], $room_owner_earnings, $app_ratio, $app_earning);
|
||||
$receiver_earningss = $this -> receiver_earnings($to_id,$gv['gift_price'],$from_type);
|
||||
$room_owner_earningss = $this -> receiver_earnings($room_owner,$gv['gift_price'],99);//结果是钻石
|
||||
$gift_rate = $this->change_give_gift_profit($gv['give_gift_id'], $ratio, $receiver_earningss, $configs['room_author_ratio'], $room_owner_earningss, $app_ratio, $app_earning);
|
||||
if (!$gift_rate) {
|
||||
Db::rollback();
|
||||
return ['code' => 0, 'msg' => '礼物记录失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user