Commit 01bc12f7 by 冷斌

fix bug

parent 0bd06bb4
...@@ -1104,14 +1104,15 @@ class Api_Live extends PhalApi_Api { ...@@ -1104,14 +1104,15 @@ class Api_Live extends PhalApi_Api {
if($pk_time && $pk_time >0 && $pk_time< $nowtime){ if($pk_time && $pk_time >0 && $pk_time< $nowtime){
$cha=5*60 - ($nowtime - $pk_time); $cha=5*60 - ($nowtime - $pk_time);
$pkinfo['pk_time']=(string)$cha; $pkinfo['pk_time']=(string)$cha;
$where =" type='expend' and action in ('sendgift','sendbarrage') and showid = {$showid} "; $pk_time_end = $pk_time + 5*60;
$pk_gift_liveuid=DI()->redis -> hGet('LivePK_gift',$liveuid); $where =" type='expend' and action in ('sendgift','sendbarrage') and addtime BETWEEN {$pk_time} AND {$pk_time_end}";
// $pk_gift_liveuid = $result=DI()->notorm->users_coinrecord->where($where . " and touid = {$liveuid}")->sum('totalcoin2'); // $pk_gift_liveuid=DI()->redis -> hGet('LivePK_gift',$liveuid);
$pk_gift_liveuid = $result=DI()->notorm->users_coinrecord->where($where . " and touid = {$liveuid}")->sum('totalcoin2');
if($pk_gift_liveuid){ if($pk_gift_liveuid){
$pkinfo['pk_gift_liveuid']=(string)$pk_gift_liveuid; $pkinfo['pk_gift_liveuid']=(string)$pk_gift_liveuid;
} }
$pk_gift_pkuid=DI()->redis -> hGet('LivePK_gift',$pkuid); // $pk_gift_pkuid=DI()->redis -> hGet('LivePK_gift',$pkuid);
// $pk_gift_pkuid = $result=DI()->notorm->users_coinrecord->where($where . " and touid = {$pkuid}")->sum('totalcoin2'); $pk_gift_pkuid = $result=DI()->notorm->users_coinrecord->where($where . " and touid = {$pkuid}")->sum('totalcoin2');
// var_dump($liveuid, $pkuid, $showid, $pk_gift_liveuid, $pk_gift_pkuid); // var_dump($liveuid, $pkuid, $showid, $pk_gift_liveuid, $pk_gift_pkuid);
// die; // die;
if($pk_gift_pkuid){ if($pk_gift_pkuid){
......
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