rabin 6 dias atrás
pai
commit
f0c7d7b358
2 arquivos alterados com 34 adições e 2 exclusões
  1. 2 2
      src/dai/seller/app/Lib/Info.php
  2. 32 0
      src/dai/seller/workerman.log

+ 2 - 2
src/dai/seller/app/Lib/Info.php

@@ -6,8 +6,8 @@ class Info
     public function dec_commit(){}
     public function dec($id, $cash)
     {
-        $sql = 'UPDATE {table} SET cash = cash - :cash WHERE id = :id AND (credit + cash) >= :cash';
-        $bind = [':cash' => $cash, ':id' => $id];
+        $sql = 'UPDATE {table} SET cash = cash - :amount WHERE id = :id AND (credit + cash) >= :need';
+        $bind = [':amount' => $cash, ':id' => $id, ':need' => $cash];
         $statement = Dever::db('seller/info')->query($sql, $bind, ['method' => 'update']);
         return $statement->rowCount() > 0;
     }

+ 32 - 0
src/dai/seller/workerman.log

@@ -5537,3 +5537,35 @@ Stack trace:
 2025-11-16 10:19:49 pid:52757 Workerman[cron.php] has been stopped
 2025-11-16 10:19:52 pid:55975 Workerman[cron.php] start in DAEMON mode
 2025-11-16 10:19:59 pid:56001 Workerman[server.php] start in DAEMON mode
+2025-11-16 11:00:18 pid:65217 Workerman[server.php] restart
+2025-11-16 11:00:18 pid:65217 Workerman[server.php] is stopping ...
+2025-11-16 11:00:18 pid:56022 Workerman[server.php] received signal SIGINT
+2025-11-16 11:00:18 pid:56022 Workerman[server.php] stopping
+2025-11-16 11:00:18 pid:56022 Workerman[server.php] has been stopped
+2025-11-16 11:00:18 pid:65217 Workerman[server.php] stop success
+2025-11-16 11:00:23 pid:65224 Workerman[cron.php] restart
+2025-11-16 11:00:23 pid:65224 Workerman[cron.php] is stopping ...
+2025-11-16 11:00:23 pid:55977 Workerman[cron.php] received signal SIGINT
+2025-11-16 11:00:23 pid:55977 Workerman[cron.php] stopping
+2025-11-16 11:00:25 pid:55977 worker[none:55978] exit with status 9
+2025-11-16 11:00:25 pid:55977 worker[none:55979] exit with status 9
+2025-11-16 11:00:25 pid:55977 worker[none:55980] exit with status 9
+2025-11-16 11:00:25 pid:55977 worker[none:55981] exit with status 9
+2025-11-16 11:00:25 pid:55977 Workerman[cron.php] has been stopped
+2025-11-16 11:00:25 pid:65224 Workerman[cron.php] stop success
+2025-11-16 11:02:49 pid:65801 Workerman[server.php] restart
+2025-11-16 11:02:49 pid:65801 Workerman[server.php] is stopping ...
+2025-11-16 11:02:49 pid:65219 Workerman[server.php] received signal SIGINT
+2025-11-16 11:02:49 pid:65219 Workerman[server.php] stopping
+2025-11-16 11:02:49 pid:65219 Workerman[server.php] has been stopped
+2025-11-16 11:02:49 pid:65801 Workerman[server.php] stop success
+2025-11-16 11:02:53 pid:65808 Workerman[cron.php] restart
+2025-11-16 11:02:53 pid:65808 Workerman[cron.php] is stopping ...
+2025-11-16 11:02:53 pid:65245 Workerman[cron.php] received signal SIGINT
+2025-11-16 11:02:53 pid:65245 Workerman[cron.php] stopping
+2025-11-16 11:02:55 pid:65245 worker[none:65246] exit with status 9
+2025-11-16 11:02:55 pid:65245 worker[none:65247] exit with status 9
+2025-11-16 11:02:55 pid:65245 worker[none:65248] exit with status 9
+2025-11-16 11:02:55 pid:65245 worker[none:65249] exit with status 9
+2025-11-16 11:02:55 pid:65245 Workerman[cron.php] has been stopped
+2025-11-16 11:02:55 pid:65808 Workerman[cron.php] stop success