|
@@ -375,10 +375,11 @@ class User extends Backend
|
|
|
if (!empty($params['jewel_add'])) {//钻石充值
|
|
|
$userWhere['id'] = $row['id'];
|
|
|
$user = Db::name('user')->where($userWhere)->find();
|
|
|
- $userwallet = Db::name('user_wallet')->where('user_id',$row['id'])->lock(true)->find();
|
|
|
+ $userwallet = Db::name('user_wallet')->where('user_id',$row['id'])->find();
|
|
|
$jewelRes = model('Wallet')->lockChangeAccountRemain($row['id'],$params['jewel_add'],'+',0,'钻石充值',17,'jewel');
|
|
|
- if (!$jewelRes['status']) {
|
|
|
- throw new Exception($jewelRes['msg']);
|
|
|
+ if ($jewelRes['status'] == false) {
|
|
|
+ Db::rollback();
|
|
|
+ $this->error($jewelRes['msg']);
|
|
|
}
|
|
|
$params['jewel'] = bcadd($userwallet['jewel'],$params['jewel_add']);
|
|
|
//充值日志记录
|