Commit 1aeb291c by 冷斌

add

parent a5b053cf
...@@ -864,6 +864,27 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -864,6 +864,27 @@ class Model_Live extends PhalApi_Model_NotORM {
"addtime"=>$addtime "addtime"=>$addtime
); );
DI()->notorm->users_coinrecord->insert($insert); DI()->notorm->users_coinrecord->insert($insert);
$luckcoin2 = (int)($luckcoin*0.05 * 100);
$luckcoin3 = $luckcoin2 / 100;
if ($luckcoin3 > 0) {
DI()->notorm->users
->where('id = ?', $liveuid)
->update( array('votes' => new NotORM_Literal("votes + {$luckcoin3}"),'votestotal' => new NotORM_Literal("votestotal + {$luckcoin3}") ));
$insert=array(
"type"=>'income',
"action"=>'luckgift',
"uid"=>$liveuid,
"touid"=>$liveuid,
"giftid"=>$giftid,
"giftcount"=>$lucktimes,
"totalcoin"=>$luckcoin,
"showid"=>$showid,
"mark"=>$giftinfo['mark'],
"addtime"=>$addtime
);
DI()->notorm->users_coinrecord->insert($insert);
}
break; break;
} }
} }
......
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