From 43c579516a7d4cc259029a437a760620ada8d61e Mon Sep 17 00:00:00 2001 From: songliang Date: Tue, 25 Jul 2023 19:47:23 +0800 Subject: [PATCH 1/3] ... --- webapp/services/LogService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index 14d3d120..a663bc9b 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -44,7 +44,7 @@ class LogService extends BaseService public static function consumeGold($event,$param = []) { - $logInfo = self::goldRecord(myself()->_getAccountId()); + $logInfo = self::goldRecord($param); $data = self::userInfo(); $data['type'] = self::CONSUME_TYPE; $data['event_name'] = $event['name']; @@ -74,7 +74,7 @@ class LogService extends BaseService public static function productGold($event,$param = []) { - $logInfo = self::goldRecord(myself()->_getAccountId()); + $logInfo = self::goldRecord($param); $data = self::userInfo(); $data['type'] = self::PRODUCT_TYPE; $data['event_name'] = $event['name']; From a622d38b21589960a60415edd01f503eaa285b79 Mon Sep 17 00:00:00 2001 From: songliang Date: Tue, 25 Jul 2023 19:55:49 +0800 Subject: [PATCH 2/3] ... --- webapp/services/LogService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/services/LogService.php b/webapp/services/LogService.php index a663bc9b..5f1ace76 100644 --- a/webapp/services/LogService.php +++ b/webapp/services/LogService.php @@ -153,8 +153,14 @@ class LogService extends BaseService ); return $info; } - private static function goldRecord($account_id) + private static function goldRecord($params = []) { + if (isset($params['account_id']) && !empty($params['account_id'])) { + $account_id = $params['account_id']; + } else { + $account_id = myself()->_getAccountId(); + } + // $logInfo['log_class'] = $logInfo['log_class']; // unset($logInfo['log_class']); $data = array( From 53fb1d0ca717bc8d0e5e28a6ae10fa56a328d0a0 Mon Sep 17 00:00:00 2001 From: songliang Date: Tue, 25 Jul 2023 20:10:26 +0800 Subject: [PATCH 3/3] ... --- webapp/controller/ShopController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index ad84e0df..f4ef0b19 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -1206,7 +1206,7 @@ class ShopController extends BaseAuthedController return; } - $token_type = getReqVal('token_type', ''); + $token_type = getReqVal('token_type', '4'); switch ($token_type) { case ShopController::TOKEN_TYPE_GOLD: case ShopController::TOKEN_TYPE_DIAMOND: