Commit def2433c by 冷斌

fix bug

parent 538e9d20
...@@ -611,7 +611,7 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -611,7 +611,7 @@ class Model_Live extends PhalApi_Model_NotORM {
/* 更新直播 魅力值 累计魅力值 */ /* 更新直播 魅力值 累计魅力值 */
$istouid =DI()->notorm->users $istouid =DI()->notorm->users
->where('id = ?', $liveuid) ->where('id = ?', $liveuid)
->update( array('votes' => new NotORM_Literal("votes + {$randomGift['needcoin']}"),'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){
$insert_votes=[ $insert_votes=[
'type'=>'income', 'type'=>'income',
...@@ -626,15 +626,13 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -626,15 +626,13 @@ class Model_Live extends PhalApi_Model_NotORM {
$stream2=explode('_',$stream); $stream2=explode('_',$stream);
$showid=$stream2[1]; $showid=$stream2[1];
$insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>-1,"giftcount"=>1,"totalcoin"=>$total,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime ); $insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>-1,"giftcount"=>1,"totalcoin"=>$anthor_total,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime );
DI()->notorm->users_coinrecord->insert($insert); DI()->notorm->users_coinrecord->insert($insert);
/* 更新主播热门 */ /* 更新主播热门 */
if($giftinfo['mark']==1){ DI()->notorm->users_live
DI()->notorm->users_live ->where('uid = ?', $liveuid)
->where('uid = ?', $liveuid) ->update( array('hotvotes' => new NotORM_Literal("hotvotes + {$anthor_total}") ));
->update( array('hotvotes' => new NotORM_Literal("hotvotes + {$total}") ));
}
DI()->redis->zIncrBy('user_'.$stream,$total,$uid); DI()->redis->zIncrBy('user_'.$stream,$total,$uid);
......
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