bobing_909_3

This commit is contained in:
dengbw
2021-09-09 14:27:04 +08:00
parent 3b32bffd3c
commit ccfa12da60
+10 -2
View File
@@ -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 . ')本次加分失败了';