bobing_909_3
This commit is contained in:
@@ -100,9 +100,17 @@ class Bobing extends HD_Controller
|
||||
}
|
||||
$uid = 5;
|
||||
$credit = rand(50, 120);
|
||||
$ret = $this->mdBobingUser->update(array("credit = credit+{$credit}" => null), array('uid' => $uid,
|
||||
'app_id' => $this->appConfig['app_id'], 'act_key' => $this->appConfig['act_key']));
|
||||
$where = array('uid' => $uid, 'app_id' => $this->appConfig['app_id'], 'act_key' => $this->appConfig['act_key']);
|
||||
$ret = $this->mdBobingUser->update(array("credit = credit+{$credit}" => null), $where);
|
||||
if ($ret) {
|
||||
$re_u = $this->mdBobingUserCredit->get($where);
|
||||
if ($re_u) {
|
||||
$this->mdBobingUserCredit->update(array("credit = credit+{$credit}" => null), $where);
|
||||
} else {
|
||||
$where['credit'] = $credit;
|
||||
$where['c_time'] = time();
|
||||
$this->mdBobingUserCredit->add($where);
|
||||
}
|
||||
echo 'uid(' . $uid . ')本次加了' . $credit;
|
||||
} else {
|
||||
echo 'uid(' . $uid . ')本次加分失败了';
|
||||
|
||||
Reference in New Issue
Block a user