Commit 538e9d20 by 冷斌

fix bug

parent f0d72537
...@@ -1215,9 +1215,10 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -1215,9 +1215,10 @@ class Model_Live extends PhalApi_Model_NotORM {
return 1001; return 1001;
} }
setAgentProfit($uid,$total); // setAgentProfit($uid,$total);
/* 更新直播 魅力值 累计魅力值 */ /* 更新直播 魅力值 累计魅力值 */
/**
$istouid =DI()->notorm->users $istouid =DI()->notorm->users
->where('id = ?', $liveuid) ->where('id = ?', $liveuid)
->update( array('votes' => new NotORM_Literal("votes + {$total}"),'votestotal' => new NotORM_Literal("votestotal + {$total}") )); ->update( array('votes' => new NotORM_Literal("votes + {$total}"),'votestotal' => new NotORM_Literal("votestotal + {$total}") ));
...@@ -1230,7 +1231,7 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -1230,7 +1231,7 @@ class Model_Live extends PhalApi_Model_NotORM {
'addtime'=>time(), 'addtime'=>time(),
]; ];
DI()->notorm->users_voterecord->insert($insert_votes); DI()->notorm->users_voterecord->insert($insert_votes);
**/
$stream2=explode('_',$stream); $stream2=explode('_',$stream);
$showid=$stream2[1]; $showid=$stream2[1];
if(!$showid){ if(!$showid){
...@@ -1238,15 +1239,15 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -1238,15 +1239,15 @@ class Model_Live extends PhalApi_Model_NotORM {
} }
/* 写入记录 或更新 */ /* 写入记录 或更新 */
$insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$total,"showid"=>$showid,"addtime"=>$addtime ); // $insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$total,"showid"=>$showid,"addtime"=>$addtime );
$isup=DI()->notorm->users_coinrecord->insert($insert); // $isup=DI()->notorm->users_coinrecord->insert($insert);
//
$userinfo2 =DI()->notorm->users // $userinfo2 =DI()->notorm->users
->select('consumption,coin') // ->select('consumption,coin')
->where('id = ?', $uid) // ->where('id = ?', $uid)
->fetchOne(); // ->fetchOne();
$level=getLevel($userinfo2['consumption']); // $level=getLevel($userinfo2['consumption']);
/* 清除缓存 */ /* 清除缓存 */
delCache("userinfo_".$uid); delCache("userinfo_".$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