Commit 364edc62 by 冷斌

fix bug

parent 861d7bf1
......@@ -509,8 +509,6 @@ class Model_Live extends PhalApi_Model_NotORM {
return 1001;
}
var_dump($ifok);die;
/* 分销 */
setAgentProfit($uid,$total);
/* 分销 */
......@@ -543,13 +541,14 @@ class Model_Live extends PhalApi_Model_NotORM {
->where('id = ?', $liveuid)
->update( array('votes' => new NotORM_Literal("votes + {$anthor_total}"),'votestotal' => new NotORM_Literal("votestotal + {$total3}") ));
if($anthor_total){
$u = DI()->notorm->users->select('coin')->where('id = ' . $uid)->fetchOne();
$insert_votes=[
'type'=>'income',
'action'=>$action,
'uid'=>$liveuid,
'votes'=>$anthor_total,
'addtime'=>time(),
'coin' => $ifok['coin']
'coin' => $u['coin']
];
DI()->notorm->users_voterecord->insert($insert_votes);
}
......
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