Commit 32efbcec by 冷斌

update

parent 763da8ce
......@@ -981,26 +981,26 @@ class Model_Live extends PhalApi_Model_NotORM {
);
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);
}
// $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;
} else {
$rateSum -= $ratePre;
......
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