From 6d18fdb644b2512243d65e52fdf4c56a59794b3f Mon Sep 17 00:00:00 2001 From: songliang Date: Sun, 16 Jul 2023 14:10:29 +0800 Subject: [PATCH] ... --- webapp/controller/ShopController.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 58cee966..cb3e8bcc 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -407,6 +407,7 @@ class ShopController extends BaseAuthedController 'val' => $item_num ]; LogService::productDiamond(['account_id' => $account_id], $event); + $this->beginFirstTupop($address); } error_log("buyGoodsDirect---" . $address . "---" . $item_id . "---" . $item_num); @@ -1711,15 +1712,18 @@ class ShopController extends BaseAuthedController return true; } - private function beginFirstTupop() + private function beginFirstTupop($address) { + if (!$address) { + $address = myself()->_getAddress(); + } $conn = myself()->_getMysql(''); $exist = SqlHelper::selectOne( $conn, 't_first_topup', array('address'), - array('address' => myself()->_getAddress()) + array('address' => $address) ); if ($exist) { return; @@ -1730,7 +1734,7 @@ class ShopController extends BaseAuthedController $conn, 't_first_topup', array( - 'address' => myself()->_getAddress(), + 'address' => $address, 'createtime' => myself()->_getNowTime(), 'status1' => 0, 'status2' => 0,