From 8a3bf19ccb140e9944bbf1cbc9c53200a9a5a7af Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 11 Jun 2024 11:49:13 +0800 Subject: [PATCH 1/3] 1 --- webapp/models/GoldBullion.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/models/GoldBullion.php b/webapp/models/GoldBullion.php index 0f5bb390..51704a6b 100644 --- a/webapp/models/GoldBullion.php +++ b/webapp/models/GoldBullion.php @@ -11,6 +11,10 @@ class GoldBullion extends BaseModel { public static function onLogin() { + $address = myself()->_getAddress(); + if (empty($address)) { + return; + } $rows = SqlHelper::ormSelect( myself()->_getSelfMysql(), 't_gold_bullion', From eee2c3892c73057c426e1cef3fbb802961a09df6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 11 Jun 2024 11:58:07 +0800 Subject: [PATCH 2/3] 1 --- webapp/models/GoldBullion.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/webapp/models/GoldBullion.php b/webapp/models/GoldBullion.php index 51704a6b..213aa483 100644 --- a/webapp/models/GoldBullion.php +++ b/webapp/models/GoldBullion.php @@ -21,10 +21,25 @@ class GoldBullion extends BaseModel { array( 'open_address' => myself()->_getAddress(), 'open_status' => self::OPEN_STATUS_PENDING, + 'returned' => 0, ) ); if (count($rows) > 0) { - + foreach ($rows as $row) { + SqlHelper::update( + myself()->_getSelfMysql(), + 't_gold_bullion', + array( + 'idx' => $row['idx'] + ), + array( + 'open_status' => self::OPEN_STATUS_SEND_BEGIN, + 'open_try_count' => function () { + return "open_try_count + 1"; + }, + ) + ); + } } } From 97caad98afcb1c3b11f3578fdf5d3b946a96cdbe Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 11 Jun 2024 14:42:21 +0800 Subject: [PATCH 3/3] 1 --- webapp/models/GoldBullion.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/models/GoldBullion.php b/webapp/models/GoldBullion.php index 213aa483..ef68792d 100644 --- a/webapp/models/GoldBullion.php +++ b/webapp/models/GoldBullion.php @@ -30,7 +30,8 @@ class GoldBullion extends BaseModel { myself()->_getSelfMysql(), 't_gold_bullion', array( - 'idx' => $row['idx'] + 'idx' => $row['idx'], + 'open_status' => self::OPEN_STATUS_PENDING ), array( 'open_status' => self::OPEN_STATUS_SEND_BEGIN,