Commit 14a5c8a7 by 冷斌

fix bug

parent 900b0169
......@@ -855,7 +855,7 @@ class Model_Live extends PhalApi_Model_NotORM {
$total = $giftinfo['votes']*$giftcount;
/* 分销 */
setAgentProfit($uid,$total);
setAgentProfit($uid,$totalcoin);
/* 分销 */
......@@ -869,7 +869,7 @@ class Model_Live extends PhalApi_Model_NotORM {
/* 幸运礼物分成 */
/* 家族分成之后的金额 */
$anthor_total=setFamilyDivide($liveuid,$anthor_total);
setFamilyDivide($liveuid,$totalcoin);
//主播 经验
$get_gift = !empty($set['get_gift']) ? $set['get_gift'] : 0;
$get_gift2 = !empty($set['get_gift2']) ? $set['get_gift2'] : 0;
......
......@@ -1348,10 +1348,10 @@
->insert(array("uid"=>$liveuid,"time"=>$time,"addtime"=>$addtime,"profit"=>$family_total,"profit_anthor"=>$anthor_total,"total"=>$total,"familyid"=>$users_family['familyid']));
if($family_total){
$family_total2 = $family_total * $configpri['family_rate'];
DI()->notorm->users
->where('id = ?', $familyinfo['uid'])
->update( array( 'f_votes' => new NotORM_Literal("f_votes + {$family_total}") ));
->update( array( 'f_votes' => new NotORM_Literal("f_votes + {$family_total2}") ));
$insert_votes=[
'type'=>'income',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment