Commit 1e042ba4 by 冷斌

fix bug

parent afe492d0
...@@ -136,7 +136,6 @@ class Model_Guard extends PhalApi_Model_NotORM { ...@@ -136,7 +136,6 @@ class Model_Guard extends PhalApi_Model_NotORM {
'uid'=>$liveuid, 'uid'=>$liveuid,
'votes'=>$total, 'votes'=>$total,
'addtime'=>$addtime, 'addtime'=>$addtime,
'coin' => $isok['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
......
...@@ -400,7 +400,6 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -400,7 +400,6 @@ class Model_Live extends PhalApi_Model_NotORM {
'uid'=>$liveuid, 'uid'=>$liveuid,
'votes'=>$total, 'votes'=>$total,
'addtime'=>time(), 'addtime'=>time(),
'coin' => $ifok['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
...@@ -541,14 +540,12 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -541,14 +540,12 @@ 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' => $u['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
} }
...@@ -557,6 +554,7 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -557,6 +554,7 @@ class Model_Live extends PhalApi_Model_NotORM {
$stream2=explode('_',$stream); $stream2=explode('_',$stream);
$showid=$stream2[1]; $showid=$stream2[1];
$u = DI()->notorm->users->select('coin')->where('id = ' . $uid)->fetchOne();
$insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$total,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime ); $insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$total,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime );
DI()->notorm->users_coinrecord->insert($insert); DI()->notorm->users_coinrecord->insert($insert);
...@@ -834,7 +832,6 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -834,7 +832,6 @@ class Model_Live extends PhalApi_Model_NotORM {
'uid'=>$liveuid, 'uid'=>$liveuid,
'votes'=>$total, 'votes'=>$total,
'addtime'=>time(), 'addtime'=>time(),
'coin' => $ifok['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
......
...@@ -1215,7 +1215,6 @@ ...@@ -1215,7 +1215,6 @@
'uid'=>$agent['one_uid'], 'uid'=>$agent['one_uid'],
'votes'=>$distribut1, 'votes'=>$distribut1,
'addtime'=>time(), 'addtime'=>time(),
'coin' => $u['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
} }
...@@ -1246,7 +1245,6 @@ ...@@ -1246,7 +1245,6 @@
'uid'=>$agent['two_uid'], 'uid'=>$agent['two_uid'],
'votes'=>$distribut2, 'votes'=>$distribut2,
'addtime'=>time(), 'addtime'=>time(),
'coin' => $u['coin']
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
} }
...@@ -1348,7 +1346,6 @@ ...@@ -1348,7 +1346,6 @@
'uid'=>$familyinfo['uid'], 'uid'=>$familyinfo['uid'],
'votes'=>$family_total, 'votes'=>$family_total,
'addtime'=>time(), 'addtime'=>time(),
'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