Commit def2433c by 冷斌

fix bug

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