0.85, 2 => 0.85] : null; } public static function orderList($params, $retry = 0) { try { $url = config('chumo.request_url') . 'orderList'; $response = HttpService::httpPost($url, json_encode($params), true); if($response === false && $retry <5) { // 发起重试 $retry++; sleep(1); return ChuMoService::orderList($params, $retry); } $responseData = json_decode($response, 1); Log::logInfo('触摸订单', [ 'params' => $params, 'response' => $responseData ], 'ChuMoOrderList'); if((isset($responseData['code']) && $responseData['code'] != 200) || !isset($responseData['data'])) { $errMsg = $responseData['msg'] ?? ''; EmailQueue::rPush('获取触摸平台下的订单信息返回错误', $errMsg, ['song.shen@kuxuan-inc.com'], '猎羽'); Log::logError('获取触摸平台下的订单信息返回错误', ['response' => $responseData], 'ChuMoApi'); return [[], 0]; } $data = $responseData['data'] ?? []; $count= $responseData['total'] ?? 0; return [$data, $count]; } catch (\Exception $e) { EmailQueue::rPush('获取触摸平台下的订单信息返回错误', '', ['song.shen@kuxuan-inc.com'], '猎羽'); Log::logError('获取触摸平台下的订单信息返回错误', [ 'line' => $e->getLine(), 'msg' => $e->getMessage() ], 'ChuMoApi-Exception'); return [[], 0]; } } public static function appList($params, $retry = 0) { try { $url = config('chumo.request_url') . 'channelList'; $url = $url . '?' . http_build_query($params); $response = HttpService::httpGet($url); if($response === false && $retry <5) { // 发起重试 $retry++; sleep(1); return ChuMoService::appList($params, $retry); } $responseData = json_decode($response, 1); Log::logInfo('应用列表', [$responseData], 'ChuMoAppList'); if(isset($responseData['code']) && $responseData['code'] != 200) { EmailQueue::rPush('获取触摸平台下的渠道信息返回错误', $responseData['msg'], ['song.shen@kuxuan-inc.com'], '猎羽'); Log::logError('获取触摸平台下的渠道信息返回错误', ['response' => $responseData], 'ChuMoApi'); return [[], 0]; } $data = $responseData['data'] ?? []; $count = $responseData['total'] ?? 0; return [$data, $count]; } catch (\Exception $e) { EmailQueue::rPush('获取触摸平台下的渠道信息返回错误', '', ['song.shen@kuxuan-inc.com'], '猎羽'); Log::logError('获取触摸平台下的渠道信息返回错误', [ 'line' => $e->getLine(), 'msg' => $e->getMessage() ], 'ChuMoApi-Exception'); } return [[], 0]; } }