Browse Source

Fixed 提现修正

程旭源 5 months ago
parent
commit
a46762ca49
1 changed files with 6 additions and 5 deletions
  1. 6 5
      application/admin/controller/greenroom/Withdrawal.php

+ 6 - 5
application/admin/controller/greenroom/Withdrawal.php

@@ -163,11 +163,12 @@ class Withdrawal extends Backend
             if ($withdraw->status != 1) throw new \Exception('状态错误');
             $withdraw->status = -1;
             $withdraw->save();
-            \app\admin\model\Admin::update([
-                'money' => bcadd($withdraw->amount, 3, 4)
-            ], [
-                'id' => $withdraw->uid
-            ]);
+            \app\admin\model\Admin::where("id", $withdraw->uid)->setInc("money", $withdraw->amount);
+//            \app\admin\model\Admin::update([
+//                'money' => bcadd($withdraw->amount, 3, 4)
+//            ], [
+//                'id' => $withdraw->uid
+//            ]);
             Db::commit();
             return \json(['code' => 1, 'msg' => '驳回成功']);
         } catch (\Exception $e) {