Commit a4e202cd by 冷斌

fix bug

parent 412b5bfe
......@@ -901,7 +901,7 @@ class Model_Live extends PhalApi_Model_NotORM {
$insert=array("type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$totalcoin,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime );
$insert=array("totalcoin2"=>$anthor_total, "type"=>$type,"action"=>$action,"uid"=>$uid,"touid"=>$liveuid,"giftid"=>$giftid,"giftcount"=>$giftcount,"totalcoin"=>$totalcoin,"showid"=>$showid,"mark"=>$giftinfo['mark'],"addtime"=>$addtime );
DI()->notorm->users_coinrecord->insert($insert);
/* 更新主播热门 */
......
......@@ -326,7 +326,7 @@ class Model_User extends PhalApi_Model_NotORM
public function getGiftDetail($uid)
{
$where = "touid = {$uid} and type='expend' and action in ('sendgift','sendbarrage')";
$results = DI()->notorm->users_coinrecord->select('uid, giftid, giftcount, totalcoin')->where($where)->order('id desc')->limit(100)->fetchAll();
$results = DI()->notorm->users_coinrecord->select('uid, giftid, giftcount, totalcoin2')->where($where)->order('id desc')->limit(100)->fetchAll();
$gift = [];
$lists = DI()->notorm->gift->select('id, giftname')->fetchAll();
foreach ($lists as $list) {
......@@ -337,7 +337,7 @@ class Model_User extends PhalApi_Model_NotORM
$userinfo = getUserInfo($result['uid']);
$data[] = [
'gift_name' => !empty($gift[$result['giftid']]) ? $gift[$result['giftid']] : '礼物',
'coin' => $result['totalcoin'],
'coin' => $result['totalcoin2'],
'number' => $result['giftcount'],
'user_nicename' => $userinfo['user_nicename'],
];
......@@ -689,7 +689,7 @@ class Model_User extends PhalApi_Model_NotORM
//送出
$where = "uid = {$touid} and type='expend' and action in ('sendgift','sendbarrage')";
$out = DI()->notorm->users_coinrecord->where($where)->order('id desc')->sum('totalcoin');
$out = DI()->notorm->users_coinrecord->where($where)->order('id desc')->sum('totalcoin2');
//魅力值
$where2 = "touid = {$touid} and type='expend' and action in ('sendgift','sendbarrage')";
......
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