Commit d0b03056 authored by luhongguang's avatar luhongguang

Merge branch 'colonel' into test

parents 15b38fc0 28f63cc5
......@@ -7,7 +7,7 @@
"php": "7.2.*",
"ext-json": "*",
"api/php_utils":"1.0.17",
"api/php_services":"1.0.13",
"api/php_services":"1.0.14",
"ext-openssl": "*"
},
"minimum-stability": "dev",
......
......@@ -4,15 +4,15 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2ccd591433ba03459f132b1bc9aef07c",
"content-hash": "6b8ea7dcd025a3916d9804461968836b",
"packages": [
{
"name": "api/php_services",
"version": "v1.0.13",
"version": "1.0.14",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "c51c248e6e7aba33fd147993b5f61f140ccd56ca"
"reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
},
"require": {
"endroid/qr-code": "^3.9",
......@@ -26,7 +26,7 @@
}
},
"description": "bp api php_services",
"time": "2021-09-02T06:50:55+00:00"
"time": "2021-09-08T06:38:07+00:00"
},
{
"name": "api/php_utils",
......
......@@ -37,8 +37,17 @@ class JwUser
}
$params = ["mobilePhone" => $params['mobile']];
//$user_info = (new TimeOut())->runGet($url, $params);
$begin = microtime(true);
$user_info = (new Request())->get($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) {
$code = $user_info['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserInfo', json_encode($user_info));
if (!$user_info) {
throw new CodeSpecialException("timeout");
......@@ -61,7 +70,6 @@ class JwUser
}
$params = ["userId" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params);
$begin = microtime(true);
$user_info = (new Request())->post($url, $params);
$end = microtime(true);
......@@ -71,7 +79,9 @@ class JwUser
} else {
$code = -1;
}
MonUtil::proxyMon($url, $code, 'jw_user', $total_time);
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserByUserId', json_encode($user_info));
if (!$user_info) {
throw new CodeSpecialException("timeout");
......@@ -91,8 +101,17 @@ class JwUser
}
$params = ["userIds" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params);
$user_info = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$user_info = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) {
$code = $user_info['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserList', json_encode($user_info));
if (!$user_info) {
throw new CodeSpecialException("timeout");
......@@ -139,7 +158,17 @@ class JwUser
throw new CodeSpecialException("failed");
}
//$pushToken = (new TimeOut())->runPost($url, $params);
$pushToken = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$pushToken = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($pushToken['response'])) {
$code = $pushToken['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_savePushToken', json_encode($pushToken));
if (!$pushToken) {
throw new CodeSpecialException("timeout");
......@@ -163,8 +192,17 @@ class JwUser
}
$params = ["userIds" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$list = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($list['response'])) {
$code = $list['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserListWithDynamic', json_encode($list));
if (!$list) {
throw new CodeSpecialException("timeout");
......@@ -188,8 +226,17 @@ class JwUser
}
$params = ["userId" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$list = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($list['response'])) {
$code = $list['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_getUserDigg', json_encode($list));
if (!$list) {
throw new CodeSpecialException("timeout");
......@@ -206,8 +253,17 @@ class JwUser
if (!$url) {
throw new CodeSpecialException("failed");
}
//$ret = (new TimeOut())->runPost($url, $params);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('jw_user_saveUpdateLife', json_encode($ret));
if (!$ret) {
throw new CodeSpecialException("timeout");
......@@ -224,8 +280,17 @@ class JwUser
if (!$url) {
throw new CodeSpecialException("failed");
}
//$ret = (new TimeOut())->runPost($url, $params);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) {
throw new CodeSpecialException("timeout");
......@@ -243,8 +308,17 @@ class JwUser
if (!$url) {
throw new CodeSpecialException("failed");
}
//$ret = (new TimeOut())->runPost($url, $params);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
$begin = microtime(true);
$ret = (new Request())->post($url, $params);
$end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000;
if (!empty($ret['response'])) {
$code = $ret['response']['code'];
} else {
$code = -1;
}
$env = \Yaf\Application::app()->environ() ?? "test";
MonUtil::proxyMon($url, $code, 'jw_user_'.$env, $total_time);
FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) {
throw new CodeSpecialException("timeout");
......
......@@ -32,19 +32,19 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => 'v1.0.13',
'version' => '1.0.13.0',
'pretty_version' => '1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
),
'api/php_utils' =>
array (
......@@ -332,7 +332,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
),
),
);
......
......@@ -2,19 +2,19 @@
"packages": [
{
"name": "api/php_services",
"version": "v1.0.13",
"version_normalized": "1.0.13.0",
"version": "1.0.14",
"version_normalized": "1.0.14.0",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "c51c248e6e7aba33fd147993b5f61f140ccd56ca"
"reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
},
"require": {
"endroid/qr-code": "^3.9",
"perftools/php-profiler": "^0.18.0",
"php": "7.2.*"
},
"time": "2021-09-02T06:50:55+00:00",
"time": "2021-09-08T06:38:07+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
......
......@@ -6,19 +6,19 @@
'aliases' =>
array (
),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => 'v1.0.13',
'version' => '1.0.13.0',
'pretty_version' => '1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
),
'api/php_utils' =>
array (
......@@ -306,7 +306,7 @@
'aliases' =>
array (
),
'reference' => '64abe898e25ed52e044b6cc7ed9adef399d0239b',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
),
),
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment