Commit 364edc62 by 冷斌

fix bug

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