This commit is contained in:
aozhiwei 2023-07-25 20:28:06 +08:00
commit 27f07ddf5f
2 changed files with 10 additions and 4 deletions

View File

@ -1206,7 +1206,7 @@ class ShopController extends BaseAuthedController
return; return;
} }
$token_type = getReqVal('token_type', ''); $token_type = getReqVal('token_type', '4');
switch ($token_type) { switch ($token_type) {
case ShopController::TOKEN_TYPE_GOLD: case ShopController::TOKEN_TYPE_GOLD:
case ShopController::TOKEN_TYPE_DIAMOND: case ShopController::TOKEN_TYPE_DIAMOND:

View File

@ -46,7 +46,7 @@ class LogService extends BaseService
public static function consumeGold($event,$param = []) public static function consumeGold($event,$param = [])
{ {
$logInfo = self::goldRecord(myself()->_getAccountId()); $logInfo = self::goldRecord($param);
$data = self::userInfo(); $data = self::userInfo();
$data['type'] = self::CONSUME_TYPE; $data['type'] = self::CONSUME_TYPE;
$data['event_name'] = $event['name']; $data['event_name'] = $event['name'];
@ -76,7 +76,7 @@ class LogService extends BaseService
public static function productGold($event,$param = []) public static function productGold($event,$param = [])
{ {
$logInfo = self::goldRecord(myself()->_getAccountId()); $logInfo = self::goldRecord($param);
$data = self::userInfo(); $data = self::userInfo();
$data['type'] = self::PRODUCT_TYPE; $data['type'] = self::PRODUCT_TYPE;
$data['event_name'] = $event['name']; $data['event_name'] = $event['name'];
@ -155,8 +155,14 @@ class LogService extends BaseService
); );
return $info; 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']; // $logInfo['log_class'] = $logInfo['log_class'];
// unset($logInfo['log_class']); // unset($logInfo['log_class']);
$data = array( $data = array(