瀏覽代碼

fix(admin): 修复用户提现拒绝时数据更新问题

- 为佣金金额增加 save() 方法调用确保数据库更新
- 为提现额度增加 save() 方法调用确保数据库更新
- 保证拒绝提现时佣金和额度能够正确回退到用户账户
shichen 3 月之前
父節點
當前提交
7631a44398
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/controller/admin/user/UserExtract.php

+ 2 - 2
app/controller/admin/user/UserExtract.php

@@ -265,9 +265,9 @@ class UserExtract extends BaseController
265
             // 拒绝提现要退回佣金和提现额度
265
             // 拒绝提现要退回佣金和提现额度
266
             if ($extract_data['withdrawal_type'] == 3) {
266
             if ($extract_data['withdrawal_type'] == 3) {
267
                 // 佣金
267
                 // 佣金
268
-                Db::name('user')->where('uid',$extract_data['uid'])->inc('brokerage_price',$extract_data['extract_price']);
268
+                Db::name('user')->where('uid',$extract_data['uid'])->inc('brokerage_price',$extract_data['extract_price'])->save();
269
                 // 提现额度
269
                 // 提现额度
270
-                Db::name('user')->where('uid',$extract_data['uid'])->inc('withdrawal_limit',$extract_data['extract_price']);
270
+                Db::name('user')->where('uid',$extract_data['uid'])->inc('withdrawal_limit',$extract_data['extract_price'])->save();
271
                 // 提现额度记录
271
                 // 提现额度记录
272
                 /** @var UserRepository $userRepository */
272
                 /** @var UserRepository $userRepository */
273
                 $userRepository = app()->make(UserRepository::class);
273
                 $userRepository = app()->make(UserRepository::class);