Explorar o código

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

- 为佣金金额增加 save() 方法调用确保数据库更新
- 为提现额度增加 save() 方法调用确保数据库更新
- 保证拒绝提现时佣金和额度能够正确回退到用户账户
shichen hai 3 meses
pai
achega
7631a44398
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 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 272
                 /** @var UserRepository $userRepository */
273 273
                 $userRepository = app()->make(UserRepository::class);