Sfoglia il codice sorgente

Fixed 提现修正

程旭源 7 mesi fa
parent
commit
a46762ca49
1 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  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) {