Commit 32efbcec by 冷斌

update

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