房主收益为0 判断
This commit is contained in:
@@ -262,11 +262,14 @@ class GiveGift extends Model
|
||||
}
|
||||
//增加房主收益并记录日志
|
||||
$room_owner_earningss = $room_owner_earnings - $host_earnings;
|
||||
$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];
|
||||
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,'房主收益');
|
||||
|
||||
Reference in New Issue
Block a user