Commit 38d4250a authored by luhongguang's avatar luhongguang

update:composer update

parent 2c92ea9e
...@@ -143,9 +143,9 @@ class IdCertification ...@@ -143,9 +143,9 @@ class IdCertification
* @param $biz_no string 业务号 * @param $biz_no string 业务号
* @param $expired int 签名生效时长 ,单位秒 * @param $expired int 签名生效时长 ,单位秒
* @file https://faceid.com/pages/documents/37661898 * @file https://faceid.com/pages/documents/37661898
* @return string * @return string | array
*/ */
public function getBizToken($id_number,$id_card_name,$liveness_type='meglive',$biz_no='merchat',$expired=10) :string public function getBizToken($id_number,$id_card_name,$liveness_type='meglive',$biz_no='merchat',$expired=10)
{ {
$form_data = [ $form_data = [
['name' => 'sign', 'contents' => self::genSign(self::key,self::secret,$expired)], ['name' => 'sign', 'contents' => self::genSign(self::key,self::secret,$expired)],
...@@ -163,6 +163,13 @@ class IdCertification ...@@ -163,6 +163,13 @@ class IdCertification
if (isset($result['code'],$result['response']['biz_token']) && $result['code'] === 0) { if (isset($result['code'],$result['response']['biz_token']) && $result['code'] === 0) {
return $result['response']['biz_token']; return $result['response']['biz_token'];
} }
if(isset($result['http_code']) && $result['http_code'] === 400)
{
if(strpos($result['msg'],'BAD_ARGUMENTS: idcard_name')) {
return ['msg' => '姓名不符合规范'];
}
}
return ''; return '';
} }
......
...@@ -18,9 +18,9 @@ class SocialCreditCertification ...@@ -18,9 +18,9 @@ class SocialCreditCertification
public static function checkSocialCredit(string $social_creadit_code) :bool public static function checkSocialCredit(string $social_creadit_code) :bool
{ {
// todo 长度判断 // todo 长度判断
if (strlen($social_creadit_code) !== 18) { // if (strlen($social_creadit_code) !== 18) {
return false; // return false;
} // }
$one = '159Y';//第一位可以出现的字符 $one = '159Y';//第一位可以出现的字符
$two = '12391';//第二位可以出现的字符 $two = '12391';//第二位可以出现的字符
...@@ -79,7 +79,7 @@ class SocialCreditCertification ...@@ -79,7 +79,7 @@ class SocialCreditCertification
'databaseImageContent' => $base64_image 'databaseImageContent' => $base64_image
]; ];
$result = (new Request())->post(self::ocr_bussiness_url, $post_data, 2500, 'json',[],1); $result = (new Request())->post(self::ocr_bussiness_url, $post_data, 5000, 'json',[],0);
if (isset($result['code'],$result['response']) && $result['code'] === 0 ) { if (isset($result['code'],$result['response']) && $result['code'] === 0 ) {
return $result['response']; return $result['response'];
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace Api\PhpServices\Daemon; namespace Api\PhpServices\Daemon;
use Api\PhpUtils\Cache\ApcuUtil; use Api\PhpUtils\Cache\ApcuUtil;
use Api\PhpUtils\Log\DaemoLog; use Api\PhpUtils\Log\DaemonLog;
use Api\PhpUtils\Message\Email; use Api\PhpUtils\Message\Email;
use Yaf\Application; use Yaf\Application;
...@@ -24,7 +24,6 @@ class Daemon ...@@ -24,7 +24,6 @@ class Daemon
protected $matser_process_id = false; protected $matser_process_id = false;
protected $output = false; protected $output = false;
protected $terminate = false; protected $terminate = false;
protected $consumer_name;
protected $log_signature = "daemon"; protected $log_signature = "daemon";
protected $env = "dev"; protected $env = "dev";
protected $exception_time_cycle = 120; // 脚本异常记录时间周期 protected $exception_time_cycle = 120; // 脚本异常记录时间周期
...@@ -33,7 +32,7 @@ class Daemon ...@@ -33,7 +32,7 @@ class Daemon
public function __construct(string $task_name, $task_class, int $worker_num = 4) public function __construct(string $task_name, $task_class, int $worker_num = 1)
{ {
$this->checkEnv(); $this->checkEnv();
...@@ -66,7 +65,7 @@ class Daemon ...@@ -66,7 +65,7 @@ class Daemon
* 若要结束守护进程可向主进程发送kill -SIGUSR1的信号,子进程完成当前工作后会逐个退出 * 若要结束守护进程可向主进程发送kill -SIGUSR1的信号,子进程完成当前工作后会逐个退出
*/ */
public function start(){ public function start(){
DaemoLog::info($this->log_signature,'process start now'); DaemonLog::info($this->log_signature,'process start now');
$this->daemon(); $this->daemon();
...@@ -79,10 +78,10 @@ class Daemon ...@@ -79,10 +78,10 @@ class Daemon
//注册信号处理,master进程中捕获SIGUSR1后通知worker进程退出 //注册信号处理,master进程中捕获SIGUSR1后通知worker进程退出
if( pcntl_signal(SIGUSR1, array(__CLASS__, "signal_handler"),false) ) if( pcntl_signal(SIGUSR1, array(__CLASS__, "signal_handler"),false) )
{ {
DaemoLog::info($this->log_signature,'master pcntl SIGUSR1 success'); // DaemonLog::info($this->log_signature,'master pcntl SIGUSR1 success');
}else }else
{ {
DaemoLog::error($this->log_signature,'master pcntl SIGUSR1 failed'); DaemonLog::error($this->log_signature,'master pcntl SIGUSR1 failed');
} }
pcntl_signal_dispatch(); pcntl_signal_dispatch();
...@@ -94,7 +93,7 @@ class Daemon ...@@ -94,7 +93,7 @@ class Daemon
unset($this->process_list[$key]); unset($this->process_list[$key]);
$this->process_list = array_values($this->process_list); $this->process_list = array_values($this->process_list);
DaemoLog::info($this->log_signature,"worker process: {".$pid."} exited with {$status}"); // DaemonLog::info($this->log_signature,"worker process: {".$pid."} exited with {$status}");
if( $this->terminate == false ) if( $this->terminate == false )
{ {
if( $this->current_process_num < $this->max_process_num ) if( $this->current_process_num < $this->max_process_num )
...@@ -111,7 +110,7 @@ class Daemon ...@@ -111,7 +110,7 @@ class Daemon
} }
} }
DaemoLog::info($this->log_signature,"shut down success"); DaemonLog::info($this->log_signature,"shut down success");
exit(0); exit(0);
} }
...@@ -134,10 +133,10 @@ class Daemon ...@@ -134,10 +133,10 @@ class Daemon
} }
if ($pid != 0) //第一子进程 if ($pid != 0) //第一子进程
{ {
DaemoLog::info($this->log_signature,'master process pid:'.$pid); DaemonLog::info($this->log_signature,'master process pid:'.$pid);
exit(0); exit(0);
} }
chdir(APPLICATION_PATH); chdir(ROOT_PATH);
umask(0); umask(0);
...@@ -160,20 +159,20 @@ class Daemon ...@@ -160,20 +159,20 @@ class Daemon
{ {
$pid = pcntl_fork(); $pid = pcntl_fork();
if( $pid == -1 ) { if( $pid == -1 ) {
DaemoLog::error($this->log_signature,'worker Process fork failed'); DaemonLog::error($this->log_signature,'worker Process fork failed');
}elseif ($pid == 0) { }elseif ($pid == 0) {
//子进程 //子进程
cli_set_process_title($this->task_name . ' ' . $this->env . ' worker process'); cli_set_process_title($this->task_name . ' ' . $this->env . ' worker process');
DaemoLog::info($this->log_signature,"worker Process {".posix_getpid()."} was created".' master process id:'.posix_getppid()); // DaemonLog::info($this->log_signature,"worker Process {".posix_getpid()."} was created".' master process id:'.posix_getppid());
//注册子进程信号 //注册子进程信号
if( pcntl_signal(SIGUSR2, array(__CLASS__, "signal_handler"),false) ) if( pcntl_signal(SIGUSR2, array(__CLASS__, "signal_handler"),false) )
{ {
DaemoLog::info( $this->log_signature ,"worker Process {".posix_getpid()."} pcntl SIGUSR2 success".' master process id:'.posix_getppid() ); // DaemonLog::info( $this->log_signature ,"worker Process {".posix_getpid()."} pcntl SIGUSR2 success".' master process id:'.posix_getppid() );
}else }else
{ {
DaemoLog::error( $this->log_signature ,"worker Process {".posix_getpid()."} pcntl SIGUSR2 failed".' master process id:'.posix_getppid() ); // DaemonLog::error( $this->log_signature ,"worker Process {".posix_getpid()."} pcntl SIGUSR2 failed".' master process id:'.posix_getppid() );
} }
// 执行指定次数后自动退出 // 执行指定次数后自动退出
...@@ -189,7 +188,7 @@ class Daemon ...@@ -189,7 +188,7 @@ class Daemon
$exception_num = ApcuUtil::apcu_inc($this->log_signature, posix_getppid(),1,$success, $this->exception_time_cycle); $exception_num = ApcuUtil::apcu_inc($this->log_signature, posix_getppid(),1,$success, $this->exception_time_cycle);
if($success && $exception_num){ if($success && $exception_num){
if($exception_num < $this->exception_save_time+1){ if($exception_num < $this->exception_save_time+1){
DaemoLog::error( $this->log_signature ,"worker Process {".posix_getpid()."} throw exception! msg: ".$e->getMessage().' master process id:'.posix_getppid() ); DaemonLog::error( $this->log_signature ,"worker Process {".posix_getpid()."} throw exception! msg: ".$e->getMessage().' master process id:'.posix_getppid() );
}elseif ($exception_num == $this->exception_alert_time){ }elseif ($exception_num == $this->exception_alert_time){
$subject= "Daemon 任务异常"; $subject= "Daemon 任务异常";
$mail_body = '任务在'.$this->exception_time_cycle.'秒内异常次数达到'.$this->exception_alert_time.'次,请及时处理。'."\r\n" . $mail_body = '任务在'.$this->exception_time_cycle.'秒内异常次数达到'.$this->exception_alert_time.'次,请及时处理。'."\r\n" .
...@@ -220,16 +219,16 @@ class Daemon ...@@ -220,16 +219,16 @@ class Daemon
} }
protected function quit() protected function quit()
{ {
DaemoLog::info( $this->log_signature ,"process shut down" ); DaemonLog::info( $this->log_signature ,"process shut down" );
$this->terminate = true; $this->terminate = true;
foreach ($this->process_list as $pid) foreach ($this->process_list as $pid)
{ {
if( posix_kill($pid, SIGUSR2) ) if( posix_kill($pid, SIGUSR2) )
{ {
DaemoLog::info( $this->log_signature ,'master process send SIGUSR2 to '.$pid.' success' ); // DaemonLog::info( $this->log_signature ,'master process send SIGUSR2 to '.$pid.' success' );
}else }else
{ {
DaemoLog::error( $this->log_signature ,'master process send SIGUSR2 to '.$pid.' failed' ); DaemonLog::error( $this->log_signature ,'master process send SIGUSR2 to '.$pid.' failed' );
} }
} }
} }
...@@ -281,7 +280,7 @@ class Daemon ...@@ -281,7 +280,7 @@ class Daemon
error_reporting(E_ALL); error_reporting(E_ALL);
//创建任务日志文件 //创建任务日志文件
$log_dir = APPLICATION_PATH.'/logs/daemon/'.$this->task_name; $log_dir = ROOT_PATH.'/logs/daemon/'.$this->task_name;
$log_path = $log_dir.'/'.$this->task_name.'.log'; $log_path = $log_dir.'/'.$this->task_name.'.log';
ini_set('error_log',$log_path ); ini_set('error_log',$log_path );
if( !file_exists($log_path) ) if( !file_exists($log_path) )
......
...@@ -21,10 +21,10 @@ use Redis; ...@@ -21,10 +21,10 @@ use Redis;
* 因为docid为62进制的数,因此每个hash结构下最多62*8=496个key * 因为docid为62进制的数,因此每个hash结构下最多62*8=496个key
*/ */
class InterDynamic class InterDynamic
{ {
private $key_map = array('follow' => 'fo', 'fans' => 'fa', 'digg' => 'di'); private $key_map = array('follow' => 'fo', 'fans' => 'fa', 'digg' => 'di', 'iden' => 'id');
private $redis = null; private $redis = null;
private $fields = []; private $fields = [];
private $reverse_map = []; private $reverse_map = [];
...@@ -194,7 +194,7 @@ class InterDynamic ...@@ -194,7 +194,7 @@ class InterDynamic
} }
foreach ($data as $docid => &$value) { foreach ($data as $docid => &$value) {
if (!Docid::validDocid($docid)) { if (!Docid::validDocid($docid)) {
// throw new \Exception("bad docid " . $docid, -1); // throw new \Exception("bad docid " . $docid, -1);
} }
} }
$updates = $this->getUpdateData($data, 'hincby'); $updates = $this->getUpdateData($data, 'hincby');
...@@ -413,7 +413,7 @@ class InterDynamic ...@@ -413,7 +413,7 @@ class InterDynamic
} }
public function incrFollow($docid, $value = 1) public function incrFollow($docid, $value = 1)
{ {
$this->incrCount($docid, 'follow', $value); return $this->incrCount($docid, 'follow', $value);
} }
public function setFans($docid, $value) public function setFans($docid, $value)
...@@ -423,7 +423,7 @@ class InterDynamic ...@@ -423,7 +423,7 @@ class InterDynamic
public function incrFans($docid, $value = 1) public function incrFans($docid, $value = 1)
{ {
$this->incrCount($docid, 'follow', $value); return $this->incrCount($docid, 'fans', $value);
} }
public function setDigg($docid, $value) public function setDigg($docid, $value)
...@@ -433,6 +433,11 @@ class InterDynamic ...@@ -433,6 +433,11 @@ class InterDynamic
public function incrDigg($docid, $value = 1) public function incrDigg($docid, $value = 1)
{ {
$this->incrCount($docid, 'digg', $value); return $this->incrCount($docid, 'digg', $value);
}
public function setIden($docid, $value)
{
return $this->setCount($docid, 'iden', $value);
} }
} }
...@@ -129,7 +129,7 @@ class JwUser ...@@ -129,7 +129,7 @@ class JwUser
* 获取简网用户动态 * 获取简网用户动态
*/ */
public function getUserListWithDynamic($params) public static function getUserListWithDynamic($params)
{ {
$url = config('interface', 'service.jw_user.get_user_dynamic'); $url = config('interface', 'service.jw_user.get_user_dynamic');
if (!$url) { if (!$url) {
...@@ -147,4 +147,27 @@ class JwUser ...@@ -147,4 +147,27 @@ class JwUser
} }
return $list; return $list;
} }
/**
* 获取简网用户历史赞
*/
public static function getUserDigg($params)
{
$url = config('interface', 'service.jw_user.get_user_digg');
if (!$url) {
throw new CodeSpecialException("failed");
}
if (empty($params['user_id'])) {
throw new CodeSpecialException("failed");
}
$params = ["userId" => $params['user_id']];
$list = (new TimeOut())->runPost($url, $params);
if (!$list) {
throw new CodeSpecialException("timeout");
}
return $list;
}
} }
...@@ -28,7 +28,7 @@ class Ksyun ...@@ -28,7 +28,7 @@ class Ksyun
'expire' => $expire_time, 'expire' => $expire_time,
]; ];
$res = (new Request())->post(self::get_down_from_ksyun, $post_data,50, 'json',[],1); $res = (new Request())->post(self::get_down_from_ksyun, $post_data,50, 'json',[],1,true);
if (isset($res['code'],$res['response']['status']) && $res['response']['status'] === 'success') { if (isset($res['code'],$res['response']['status']) && $res['response']['status'] === 'success') {
return $res['response']['data']; return $res['response']['data'];
} }
......
...@@ -73,7 +73,7 @@ class Request ...@@ -73,7 +73,7 @@ class Request
$options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url) { $options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url) {
$this->result['http_code'] = $stats->getHandlerStat('http_code'); $this->result['http_code'] = $stats->getHandlerStat('http_code');
if (!empty($use_mon)) { if (!empty($use_mon)) {
//MonUtil::proxyMon($url, $stats->getHandlerStat('http_code'), round($stats->getHandlerStat('total_time'),4) * 1000); MonUtil::proxyMon($url, $stats->getHandlerStat('http_code'), '',round($stats->getHandlerStat('total_time'),4) * 1000);
} }
}; };
//异步get请求 //异步get请求
...@@ -107,11 +107,12 @@ class Request ...@@ -107,11 +107,12 @@ class Request
* @param array $headers 自定义headers * @param array $headers 自定义headers
* @param int $retry 重试次数 * @param int $retry 重试次数
* @param bool $use_mon 是否使用监控打点(默认是) * @param bool $use_mon 是否使用监控打点(默认是)
* @param string $module 模块名
* @param string $proxy 代理(比如http://192.11.222.124:8000) * @param string $proxy 代理(比如http://192.11.222.124:8000)
* @return array * @return array
* @throws * @throws
*/ */
public function post($url, $params = [], $timeout = 0, $content_type = '', $headers = [], $retry = 0, $use_mon = true, $proxy = '') public function post($url, $params = [], $timeout = 0, $content_type = '', $headers = [], $retry = 0, $use_mon = true,$module ='', $proxy = '')
{ {
try { try {
//验参 //验参
...@@ -145,10 +146,10 @@ class Request ...@@ -145,10 +146,10 @@ class Request
if (!empty($proxy)) { if (!empty($proxy)) {
$options['proxy'] = $proxy; $options['proxy'] = $proxy;
} }
$options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url) { $options['on_stats'] = function (TransferStats $stats) use ($use_mon, $url,$module) {
$this->result['http_code'] = $stats->getHandlerStat('http_code'); $this->result['http_code'] = $stats->getHandlerStat('http_code');
if (!empty($use_mon)) { if ($use_mon) {
MonUtil::proxyMon($use_mon,$url, $stats->getHandlerStat('http_code'), round($stats->getHandlerStat('total_time'),4) * 1000); MonUtil::proxyMon($url, $stats->getHandlerStat('http_code'), $module,round($stats->getHandlerStat('total_time'),4) * 1000);
} }
}; };
//异步post请求 //异步post请求
......
...@@ -50,36 +50,57 @@ class MonUtil{ ...@@ -50,36 +50,57 @@ class MonUtil{
* @param int $request_time 请求总时长 * @param int $request_time 请求总时长
* @return string 打点信息或"" * @return string 打点信息或""
*/ */
public static function proxyMon($module, $url, $code, $request_time = -899){ public static function proxyMon($url, $code, $module='',$request_time = -899){
$result = ""; $result = "";
if(is_string($url) && !empty($url)){ if(is_string($url) && !empty($url)){
//截取请求第三方服务的uri
$index = strpos($url,'?');
if($index != 0){
$preg_uri = substr($url,0, $index);
}else{
$preg_uri = $url;
}
//截取请求第三方服务的uri
$parse_url = parse_url($url);
$preg_uri = $parse_url['path'] ?? $url;
$host = $parse_url['host'] ?? 'other_depent';
//替换$uri中的"."为"_", ":"为"_", "/"为"-" //替换$uri中的"."为"_", ":"为"_", "/"为"-"
$request_uri = str_replace(array(".", ":", "/"),array("_", "_", "-"), $preg_uri); $request_uri = str_replace(array(".", ":", "/"),array("_", "_", "-"), $preg_uri);
$request_module = str_replace(array(".", ":", "/"),array("_", "_", "-"), $host);
if (empty($module)) {
//默认取url 中的域名作为module
$domain = $_SERVER['SERVER_NAME'] ?? 'unknow_domain';
$module = $domain.($request_module ?? 'other_depent');
}
//接口返回状态码打点 //接口返回状态码打点
if(!empty($code) && is_numeric($code)){ if(!empty($code) && is_numeric($code)){
$result = MonUtil::counting($module . "." . strval($request_uri), strval($code),1) . "\n"; $result = self::counting($module . "." . (string)$request_uri, (string)$code,1) . "\n";
}else{ }else{
$result = MonUtil::counting($module . "." . strval($request_uri), strval(-999),1) . "\n"; $result = self::counting($module . "." . (string)$request_uri, (string)-999,1) . "\n";
} }
//接口请求响应总时间打点 //接口请求响应总时间打点
if(!empty($request_time) && is_numeric($request_time) && $request_time != -899){ if(!empty($request_time) && is_numeric($request_time) && $request_time != -899){
$result = $result . MonUtil::timing(strval($request_uri),"TotalTime", $request_time); $result .= self::timing((string)$request_uri, "TotalTime", $request_time);
} }
} }
return $result; return $result;
} }
public static function mongoMon($mysql_host,$operator,$request_time = -799)
{
if (empty($mysql_host) || empty($operator)) {
return ;
}
//记录请求量
self::counting('mongodb.'.$mysql_host , (string)$operator,0) . "\n";
//耗时打点
if(!empty($request_time) && is_numeric($request_time) && $request_time != -799){
$result = self::timing((string)('mongodb.'.$mysql_host.$operator), "TotalTime", $request_time);
}
}
/** /**
* @param string $module * @param string $module
* @param string $index * @param string $index
...@@ -114,6 +135,35 @@ class MonUtil{ ...@@ -114,6 +135,35 @@ class MonUtil{
return $result; return $result;
} }
/**
* @param $module string 项目模块
* @param $event string 事件
* @param int $count
* @return string
*/
public static function send_count_msg(string $module,string $event, $count = 1)
{
if (!empty($_SERVER['YIDIAN_LOCAL_IP']))
{
$msg = sprintf("Ydbot.statsd.superfe.bp.%s.%s.1sec:%s|c", $module,$event, $count);
self::base($msg);
}
}
/**
* @param string $module string 项目模块
* @param $func_name string 函数或者监听的事件名称
* @param $cost
*/
public static function send_time_cost_msg(string $module,$func_name, $cost)
{
if (!empty($_SERVER['YIDIAN_LOCAL_IP']))
{
$msg = sprintf("Ydbot.statsd.superfe.bp.%s.%s.1sec:%s|ms", $module, $func_name, $cost);
self::base($msg);
}
}
/** /**
* 标量是任何可以测量的一维变量,可以通过显示的加入符号让系统进行值的累加,不加符号时添加的新值会覆盖旧值 * 标量是任何可以测量的一维变量,可以通过显示的加入符号让系统进行值的累加,不加符号时添加的新值会覆盖旧值
* *
......
<?php
namespace Api\PhpUtils\Mon;
class TimeCostUtil
{
private $time_costs;
public static $one;
private function __construct()
{
$this->time_costs = array();
}
public static function getSingleton()
{
if (self::$one === null)
{
self::$one = new TimeCostUtil();
self::$one->record_time('req_all_cost');
}
return self::$one;
}
public function record_time($name)
{
$this->time_costs[$name][] = microtime(true);
}
/**
* 获取消耗的时间
* @param $name
* @return bool|mixed
*/
public function get_time_cost($name)
{
if (isset($this->time_costs[$name]) && count($this->time_costs[$name]) === 2)
{
return $this->time_costs[$name][1] - $this->time_costs[$name][0];
}
return false;
}
/**
* 获取所有消耗的时间
* @param $modules
* @return array
*/
public function get_all_time_cost($modules='')
{
if(empty($modules)) {
$modules = $_SERVER['SERVER_NAME'] ?? '';
}
//因grafana打点路径以"."分割,将服务器名中的"."转化为"_"
$modules = str_replace(".", "_", $modules);
if (self::$one !== null) {
self::$one->record_time('req_all_cost');
}
$result = array();
foreach ($this->time_costs as $name => $times)
{
if (count($times) === 2)
{
$result[$name] = $times[1] - $times[0];
MonUtil::send_time_cost_msg($modules,$name, $result[$name]);
} else {
$result[$name] = false;
}
}
return $result;
}
}
\ No newline at end of file
...@@ -7,12 +7,13 @@ use MongoDB\Driver\Manager; ...@@ -7,12 +7,13 @@ use MongoDB\Driver\Manager;
use MongoDB\Driver\ReadConcern; use MongoDB\Driver\ReadConcern;
use MongoDB\Driver\ReadPreference; use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern; use MongoDB\Driver\WriteConcern;
use Api\PhpUtils\Mon\MonUtil;
/** /**
* MongoDB基类 * MongoDB基类
* *
* 1. MongoDB配置信息在yaconf的mongo.ini中,configIndex, databaseName, collectionName 在子类中设置 * 1. MongoDB配置信息在yaconf的mongo.ini中,configIndex, databaseName, collectionName 在子类中设置
* *
* 2. writeConcern, readConcern, readPreference, typeMap 是可以从MongoDB\Driver\Manager继承的, * 2. writeConcern, readConcern, readPreference, typeMap 是可以从MongoDB\Driver\Manager继承的,
* 可以参考扩展API文档修改 * 可以参考扩展API文档修改
* $options = [ * $options = [
...@@ -22,16 +23,16 @@ use MongoDB\Driver\WriteConcern; ...@@ -22,16 +23,16 @@ use MongoDB\Driver\WriteConcern;
* 'writeConcern' => new WriteConcern(WriteConcern::MAJORITY), * 'writeConcern' => new WriteConcern(WriteConcern::MAJORITY),
* ]; * ];
* @see https://www.php.net/manual/zh/book.mongodb.php * @see https://www.php.net/manual/zh/book.mongodb.php
* *
* 3. 提供常用的CURD方法,共他方法会调用 __call()方法 * 3. 提供常用的CURD方法,共他方法会调用 __call()方法
* *
* 4. MongoDB建议对重要的数据使用 {w: “marjority”} 的选项 (WriteConcern::MAJORITY)。 * 4. MongoDB建议对重要的数据使用 {w: “marjority”} 的选项 (WriteConcern::MAJORITY)。
* 可以保证数据在复制到多数节点后才返回成功结果。使用该机制可以有效防止数据回滚的发生。 * 可以保证数据在复制到多数节点后才返回成功结果。使用该机制可以有效防止数据回滚的发生。
* 另外你可以使用 {j:1} (可以和 w:”majrotiy” 结合使用)来指定数据必须在写入WAL日志之后才向应用返回成功确认。这个会导致写入性能有所下降,但是对于重要的数据可以考虑使用 * 另外你可以使用 {j:1} (可以和 w:”majrotiy” 结合使用)来指定数据必须在写入WAL日志之后才向应用返回成功确认。这个会导致写入性能有所下降,但是对于重要的数据可以考虑使用
* *
* 5. 异常的捕获与处理 及 getMatchedCount(), getModifiedCount(), getUpsertedCount() 在业务中按需获取,写入retry(1s,2s,4s...) * 5. 异常的捕获与处理 及 getMatchedCount(), getModifiedCount(), getUpsertedCount() 在业务中按需获取,写入retry(1s,2s,4s...)
* *
* 6. 根据镜像中php的monogodb扩展版本选择使用1.4版本 * 6. 根据镜像中php的monogodb扩展版本选择使用1.4版本
* @see https://docs.mongodb.com/drivers/php/ 驱动兼容对照表 * @see https://docs.mongodb.com/drivers/php/ 驱动兼容对照表
* @see https://docs.mongodb.com/php-library/v1.4/ 官方文档 * @see https://docs.mongodb.com/php-library/v1.4/ 官方文档
*/ */
...@@ -123,7 +124,7 @@ abstract class MongoBase ...@@ -123,7 +124,7 @@ abstract class MongoBase
if (!$this->collection) { if (!$this->collection) {
return false; return false;
} }
return call_user_func_array([$this->collection, $method], $args); return call_user_func_array([$this->collection, $method], $args);
} }
...@@ -150,7 +151,7 @@ abstract class MongoBase ...@@ -150,7 +151,7 @@ abstract class MongoBase
* *
* @return object * @return object
*/ */
public function getClient() public function getClient()
{ {
return $this->client; return $this->client;
} }
...@@ -160,7 +161,7 @@ abstract class MongoBase ...@@ -160,7 +161,7 @@ abstract class MongoBase
* *
* @return object * @return object
*/ */
public function getDatabase() public function getDatabase()
{ {
return $this->database; return $this->database;
} }
...@@ -170,7 +171,7 @@ abstract class MongoBase ...@@ -170,7 +171,7 @@ abstract class MongoBase
* *
* @return object * @return object
*/ */
public function getCollection() public function getCollection()
{ {
return $this->collection; return $this->collection;
} }
...@@ -179,11 +180,11 @@ abstract class MongoBase ...@@ -179,11 +180,11 @@ abstract class MongoBase
* 集合的初始化参数 * 集合的初始化参数
* *
* 可以继承初始化配置文件中,默认的,或都子类中的 * 可以继承初始化配置文件中,默认的,或都子类中的
* *
* @param array $collectionOptions * @param array $collectionOptions
* @return array * @return array
*/ */
protected function getCollectionOptions(array $collectionOptions = []) protected function getCollectionOptions(array $collectionOptions = [])
{ {
$collectionOptions += [ $collectionOptions += [
'readConcern' => $this->client->getreadConcern() ?: new ReadConcern(ReadConcern::LOCAL), //3.2之前的服务器版本不支持此功能 'readConcern' => $this->client->getreadConcern() ?: new ReadConcern(ReadConcern::LOCAL), //3.2之前的服务器版本不支持此功能
...@@ -191,7 +192,7 @@ abstract class MongoBase ...@@ -191,7 +192,7 @@ abstract class MongoBase
'typeMap' => ['root' => 'array', 'document' => 'array'], 'typeMap' => ['root' => 'array', 'document' => 'array'],
'writeConcern' => $this->client->getWriteConcern() ?: new WriteConcern(self::W, 3 * self::WTIMEOUTMS), 'writeConcern' => $this->client->getWriteConcern() ?: new WriteConcern(self::W, 3 * self::WTIMEOUTMS),
]; ];
return $collectionOptions; return $collectionOptions;
} }
...@@ -201,7 +202,7 @@ abstract class MongoBase ...@@ -201,7 +202,7 @@ abstract class MongoBase
* @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-insertOne/ * @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-insertOne/
* @param array|object $document The document to insert * @param array|object $document The document to insert
* @param array $options Command options * @param array $options Command options
* @return InsertOneResult * @return \MongoDB\InsertOneResult
* @throws InvalidArgumentException for parameter/option parsing errors * @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors) * @throws DriverRuntimeException for other driver errors (e.g. connection errors)
*/ */
...@@ -210,7 +211,13 @@ abstract class MongoBase ...@@ -210,7 +211,13 @@ abstract class MongoBase
$options += [ $options += [
'writeConcern' => new WriteConcern(self::W, 3 * self::WTIMEOUTMS), // W=1要求进行写入确认, 超时时间3000毫秒 'writeConcern' => new WriteConcern(self::W, 3 * self::WTIMEOUTMS), // W=1要求进行写入确认, 超时时间3000毫秒
]; ];
return $this->collection->insertOne($document, $options);
$start_time = microtime(true);
$res = $this->collection->insertOne($document, $options);
$end_time = microtime(true);
MonUtil::mongoMon($this->client->getManager()->getServers(),'insertOne',$end_time-$start_time);
return $res;
} }
/** /**
...@@ -219,7 +226,7 @@ abstract class MongoBase ...@@ -219,7 +226,7 @@ abstract class MongoBase
* @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-insertMany/ * @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-insertMany/
* @param array[]|object[] $documents The documents to insert * @param array[]|object[] $documents The documents to insert
* @param array $options Command options * @param array $options Command options
* @return InsertManyResult * @return \MongoDB\InsertManyResult
* @throws InvalidArgumentException for parameter/option parsing errors * @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors) * @throws DriverRuntimeException for other driver errors (e.g. connection errors)
*/ */
...@@ -229,16 +236,21 @@ abstract class MongoBase ...@@ -229,16 +236,21 @@ abstract class MongoBase
'ordered' => true, // 默认值为true, 当单个写入失败时,该操作将停止而不执行剩余的写入操作并引发异常 'ordered' => true, // 默认值为true, 当单个写入失败时,该操作将停止而不执行剩余的写入操作并引发异常
'writeConcern' => new WriteConcern(self::W, 5 * self::WTIMEOUTMS), 'writeConcern' => new WriteConcern(self::W, 5 * self::WTIMEOUTMS),
]; ];
return $this->collection->insertMany($documents, $options); $start_time = microtime(true);
$res = $this->collection->insertMany($documents, $options);
$end_time = microtime(true);
MonUtil::mongoMon($this->client->getManager()->getServers(),'insertMany',$end_time-$start_time);
return $res;
} }
/** /**
* Deletes at most one document matching the filter. * Deletes at most one document matching the filter.
* *
* @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-deleteOne/ * @see https://docs.mongodb.com/php-library/v1.4/reference/method/MongoDBCollection-deleteOne/
* @param array|object $filter Query by which to delete documents * @param array|object $filter Query by which to delete documents
* @param array $options Command options * @param array $options Command options
* @return DeleteResult * @return \MongoDB\DeleteResult
* @throws UnsupportedException if options are not supported by the selected server * @throws UnsupportedException if options are not supported by the selected server
* @throws InvalidArgumentException for parameter/option parsing errors * @throws InvalidArgumentException for parameter/option parsing errors
* @throws DriverRuntimeException for other driver errors (e.g. connection errors) * @throws DriverRuntimeException for other driver errors (e.g. connection errors)
...@@ -248,9 +260,13 @@ abstract class MongoBase ...@@ -248,9 +260,13 @@ abstract class MongoBase
$options += [ $options += [
'writeConcern' => new WriteConcern(self::W, 3 * self::WTIMEOUTMS), 'writeConcern' => new WriteConcern(self::W, 3 * self::WTIMEOUTMS),
]; ];
return $this->collection->deleteOne($filter, $options); $start_time = microtime(true);
$res = $this->collection->deleteOne($filter, $options);
$end_time = microtime(true);
MonUtil::mongoMon($this->client->getManager()->getServers(),'deleteOne',$end_time-$start_time);
return $res;
} }
/** /**
* Deletes all documents matching the filter. * Deletes all documents matching the filter.
* *
...@@ -286,9 +302,13 @@ abstract class MongoBase ...@@ -286,9 +302,13 @@ abstract class MongoBase
$options += [ $options += [
'maxTimeMS' => 3 * self::MAXTIMEMS, 'maxTimeMS' => 3 * self::MAXTIMEMS,
]; ];
return $this->collection->findOne($filter, $options); $start_time = microtime(true);
$res = $this->collection->findOne($filter, $options);
$end_time = microtime(true);
MonUtil::mongoMon($this->client->getManager()->getServers(),'findOne',$end_time-$start_time);
return $res;
} }
/** /**
* Finds documents matching the query. * Finds documents matching the query.
* *
...@@ -382,7 +402,7 @@ abstract class MongoBase ...@@ -382,7 +402,7 @@ abstract class MongoBase
]; ];
return $this->collection->updateOne($filter, $update, $options); return $this->collection->updateOne($filter, $update, $options);
} }
/** /**
* Updates all documents matching the filter. * Updates all documents matching the filter.
* *
......
...@@ -32,7 +32,7 @@ private static $installed = array ( ...@@ -32,7 +32,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'aaa7a15562bb4388a4d9b639c7623edd5f44e2d7', 'reference' => '2c92ea9e9ceb03dd50ff5f10f4fd2d1273841535',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
...@@ -45,7 +45,7 @@ private static $installed = array ( ...@@ -45,7 +45,7 @@ private static $installed = array (
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => 'efdbb7f13f8184d60b56b0fb876b8868147162ac', 'reference' => 'b0d289d91840da2cf8f373f718101e2d0fcff4ae',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -55,7 +55,7 @@ private static $installed = array ( ...@@ -55,7 +55,7 @@ private static $installed = array (
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => '474c015979f967bcd045224c7e4f47c206dcfad7', 'reference' => '1368a385a7b4bda8d18ecd177209a16731922825',
), ),
'elasticsearch/elasticsearch' => 'elasticsearch/elasticsearch' =>
array ( array (
...@@ -184,7 +184,7 @@ private static $installed = array ( ...@@ -184,7 +184,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'aaa7a15562bb4388a4d9b639c7623edd5f44e2d7', 'reference' => '2c92ea9e9ceb03dd50ff5f10f4fd2d1273841535',
), ),
), ),
); );
......
...@@ -55,6 +55,7 @@ return array( ...@@ -55,6 +55,7 @@ return array(
'Api\\PhpUtils\\Log\\FileLog' => $vendorDir . '/api/php_utils/src/Log/FileLog.php', 'Api\\PhpUtils\\Log\\FileLog' => $vendorDir . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php', 'Api\\PhpUtils\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => $vendorDir . '/api/php_utils/src/Mon/MonUtil.php', 'Api\\PhpUtils\\Mon\\MonUtil' => $vendorDir . '/api/php_utils/src/Mon/MonUtil.php',
'Api\\PhpUtils\\Mon\\TimeCostUtil' => $vendorDir . '/api/php_utils/src/Mon/TimeCostUtil.php',
'Api\\PhpUtils\\Mongo\\MongoBase' => $vendorDir . '/api/php_utils/src/Mongo/MongoBase.php', 'Api\\PhpUtils\\Mongo\\MongoBase' => $vendorDir . '/api/php_utils/src/Mongo/MongoBase.php',
'Api\\PhpUtils\\Mysql\\Medoo' => $vendorDir . '/api/php_utils/src/Mysql/Medoo.php', 'Api\\PhpUtils\\Mysql\\Medoo' => $vendorDir . '/api/php_utils/src/Mysql/Medoo.php',
'Api\\PhpUtils\\Mysql\\MysqlBase' => $vendorDir . '/api/php_utils/src/Mysql/MysqlBase.php', 'Api\\PhpUtils\\Mysql\\MysqlBase' => $vendorDir . '/api/php_utils/src/Mysql/MysqlBase.php',
...@@ -72,6 +73,7 @@ return array( ...@@ -72,6 +73,7 @@ return array(
'App\\Exception\\ExceptionHandler' => $baseDir . '/application/exception/ExceptionHandler.php', 'App\\Exception\\ExceptionHandler' => $baseDir . '/application/exception/ExceptionHandler.php',
'App\\Exception\\custom\\Code' => $baseDir . '/application/exception/custom/Code.php', 'App\\Exception\\custom\\Code' => $baseDir . '/application/exception/custom/Code.php',
'App\\Exception\\custom\\CodeSpecialException' => $baseDir . '/application/exception/custom/CodeSpecialException.php', 'App\\Exception\\custom\\CodeSpecialException' => $baseDir . '/application/exception/custom/CodeSpecialException.php',
'App\\Exception\\custom\\DistributorException' => $baseDir . '/application/exception/custom/DistributorException.php',
'App\\Exception\\custom\\GoodsException' => $baseDir . '/application/exception/custom/GoodsException.php', 'App\\Exception\\custom\\GoodsException' => $baseDir . '/application/exception/custom/GoodsException.php',
'App\\Exception\\custom\\ParamException' => $baseDir . '/application/exception/custom/ParamException.php', 'App\\Exception\\custom\\ParamException' => $baseDir . '/application/exception/custom/ParamException.php',
'App\\Exception\\custom\\ShopException' => $baseDir . '/application/exception/custom/ShopException.php', 'App\\Exception\\custom\\ShopException' => $baseDir . '/application/exception/custom/ShopException.php',
...@@ -81,6 +83,7 @@ return array( ...@@ -81,6 +83,7 @@ return array(
'App\\Models\\demo\\mongo\\User' => $baseDir . '/application/models/demo/mongo/User.php', 'App\\Models\\demo\\mongo\\User' => $baseDir . '/application/models/demo/mongo/User.php',
'App\\Models\\demo\\mysql\\User' => $baseDir . '/application/models/demo/mysql/User.php', 'App\\Models\\demo\\mysql\\User' => $baseDir . '/application/models/demo/mysql/User.php',
'App\\Models\\distribution\\mysql\\Distribution' => $baseDir . '/application/models/distribution/mysql/Distribution.php', 'App\\Models\\distribution\\mysql\\Distribution' => $baseDir . '/application/models/distribution/mysql/Distribution.php',
'App\\Models\\distribution\\mysql\\Distributor' => $baseDir . '/application/models/distribution/mysql/Distributor.php',
'App\\Models\\goods\\mysql\\Category' => $baseDir . '/application/models/goods/mysql/Category.php', 'App\\Models\\goods\\mysql\\Category' => $baseDir . '/application/models/goods/mysql/Category.php',
'App\\Models\\goods\\mysql\\GoodsOperationRecord' => $baseDir . '/application/models/goods/mysql/GoodsOperationRecord.php', 'App\\Models\\goods\\mysql\\GoodsOperationRecord' => $baseDir . '/application/models/goods/mysql/GoodsOperationRecord.php',
'App\\Models\\goods\\mysql\\GoodsSku' => $baseDir . '/application/models/goods/mysql/GoodsSku.php', 'App\\Models\\goods\\mysql\\GoodsSku' => $baseDir . '/application/models/goods/mysql/GoodsSku.php',
...@@ -96,6 +99,7 @@ return array( ...@@ -96,6 +99,7 @@ return array(
'App\\Services\\demo\\MongoService' => $baseDir . '/application/services/demo/MongoService.php', 'App\\Services\\demo\\MongoService' => $baseDir . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => $baseDir . '/application/services/demo/MysqlService.php', 'App\\Services\\demo\\MysqlService' => $baseDir . '/application/services/demo/MysqlService.php',
'App\\Services\\distribution\\DistributionService' => $baseDir . '/application/services/distribution/DistributionService.php', 'App\\Services\\distribution\\DistributionService' => $baseDir . '/application/services/distribution/DistributionService.php',
'App\\Services\\distribution\\DistributorService' => $baseDir . '/application/services/distribution/DistributorService.php',
'App\\Services\\goods\\CategoryService' => $baseDir . '/application/services/goods/CategoryService.php', 'App\\Services\\goods\\CategoryService' => $baseDir . '/application/services/goods/CategoryService.php',
'App\\Services\\goods\\ElasticGoodService' => $baseDir . '/application/services/goods/ElasticGoodService.php', 'App\\Services\\goods\\ElasticGoodService' => $baseDir . '/application/services/goods/ElasticGoodService.php',
'App\\Services\\goods\\GoodsService' => $baseDir . '/application/services/goods/GoodsService.php', 'App\\Services\\goods\\GoodsService' => $baseDir . '/application/services/goods/GoodsService.php',
......
...@@ -191,6 +191,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a ...@@ -191,6 +191,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'Api\\PhpUtils\\Log\\FileLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/FileLog.php', 'Api\\PhpUtils\\Log\\FileLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php', 'Api\\PhpUtils\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/MonUtil.php', 'Api\\PhpUtils\\Mon\\MonUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/MonUtil.php',
'Api\\PhpUtils\\Mon\\TimeCostUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/TimeCostUtil.php',
'Api\\PhpUtils\\Mongo\\MongoBase' => __DIR__ . '/..' . '/api/php_utils/src/Mongo/MongoBase.php', 'Api\\PhpUtils\\Mongo\\MongoBase' => __DIR__ . '/..' . '/api/php_utils/src/Mongo/MongoBase.php',
'Api\\PhpUtils\\Mysql\\Medoo' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/Medoo.php', 'Api\\PhpUtils\\Mysql\\Medoo' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/Medoo.php',
'Api\\PhpUtils\\Mysql\\MysqlBase' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/MysqlBase.php', 'Api\\PhpUtils\\Mysql\\MysqlBase' => __DIR__ . '/..' . '/api/php_utils/src/Mysql/MysqlBase.php',
...@@ -208,6 +209,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a ...@@ -208,6 +209,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'App\\Exception\\ExceptionHandler' => __DIR__ . '/../..' . '/application/exception/ExceptionHandler.php', 'App\\Exception\\ExceptionHandler' => __DIR__ . '/../..' . '/application/exception/ExceptionHandler.php',
'App\\Exception\\custom\\Code' => __DIR__ . '/../..' . '/application/exception/custom/Code.php', 'App\\Exception\\custom\\Code' => __DIR__ . '/../..' . '/application/exception/custom/Code.php',
'App\\Exception\\custom\\CodeSpecialException' => __DIR__ . '/../..' . '/application/exception/custom/CodeSpecialException.php', 'App\\Exception\\custom\\CodeSpecialException' => __DIR__ . '/../..' . '/application/exception/custom/CodeSpecialException.php',
'App\\Exception\\custom\\DistributorException' => __DIR__ . '/../..' . '/application/exception/custom/DistributorException.php',
'App\\Exception\\custom\\GoodsException' => __DIR__ . '/../..' . '/application/exception/custom/GoodsException.php', 'App\\Exception\\custom\\GoodsException' => __DIR__ . '/../..' . '/application/exception/custom/GoodsException.php',
'App\\Exception\\custom\\ParamException' => __DIR__ . '/../..' . '/application/exception/custom/ParamException.php', 'App\\Exception\\custom\\ParamException' => __DIR__ . '/../..' . '/application/exception/custom/ParamException.php',
'App\\Exception\\custom\\ShopException' => __DIR__ . '/../..' . '/application/exception/custom/ShopException.php', 'App\\Exception\\custom\\ShopException' => __DIR__ . '/../..' . '/application/exception/custom/ShopException.php',
...@@ -217,6 +219,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a ...@@ -217,6 +219,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'App\\Models\\demo\\mongo\\User' => __DIR__ . '/../..' . '/application/models/demo/mongo/User.php', 'App\\Models\\demo\\mongo\\User' => __DIR__ . '/../..' . '/application/models/demo/mongo/User.php',
'App\\Models\\demo\\mysql\\User' => __DIR__ . '/../..' . '/application/models/demo/mysql/User.php', 'App\\Models\\demo\\mysql\\User' => __DIR__ . '/../..' . '/application/models/demo/mysql/User.php',
'App\\Models\\distribution\\mysql\\Distribution' => __DIR__ . '/../..' . '/application/models/distribution/mysql/Distribution.php', 'App\\Models\\distribution\\mysql\\Distribution' => __DIR__ . '/../..' . '/application/models/distribution/mysql/Distribution.php',
'App\\Models\\distribution\\mysql\\Distributor' => __DIR__ . '/../..' . '/application/models/distribution/mysql/Distributor.php',
'App\\Models\\goods\\mysql\\Category' => __DIR__ . '/../..' . '/application/models/goods/mysql/Category.php', 'App\\Models\\goods\\mysql\\Category' => __DIR__ . '/../..' . '/application/models/goods/mysql/Category.php',
'App\\Models\\goods\\mysql\\GoodsOperationRecord' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsOperationRecord.php', 'App\\Models\\goods\\mysql\\GoodsOperationRecord' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsOperationRecord.php',
'App\\Models\\goods\\mysql\\GoodsSku' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSku.php', 'App\\Models\\goods\\mysql\\GoodsSku' => __DIR__ . '/../..' . '/application/models/goods/mysql/GoodsSku.php',
...@@ -232,6 +235,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a ...@@ -232,6 +235,7 @@ class ComposerStaticInit48fd9e88279ffd9162a19bdedd5d5a0a
'App\\Services\\demo\\MongoService' => __DIR__ . '/../..' . '/application/services/demo/MongoService.php', 'App\\Services\\demo\\MongoService' => __DIR__ . '/../..' . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => __DIR__ . '/../..' . '/application/services/demo/MysqlService.php', 'App\\Services\\demo\\MysqlService' => __DIR__ . '/../..' . '/application/services/demo/MysqlService.php',
'App\\Services\\distribution\\DistributionService' => __DIR__ . '/../..' . '/application/services/distribution/DistributionService.php', 'App\\Services\\distribution\\DistributionService' => __DIR__ . '/../..' . '/application/services/distribution/DistributionService.php',
'App\\Services\\distribution\\DistributorService' => __DIR__ . '/../..' . '/application/services/distribution/DistributorService.php',
'App\\Services\\goods\\CategoryService' => __DIR__ . '/../..' . '/application/services/goods/CategoryService.php', 'App\\Services\\goods\\CategoryService' => __DIR__ . '/../..' . '/application/services/goods/CategoryService.php',
'App\\Services\\goods\\ElasticGoodService' => __DIR__ . '/../..' . '/application/services/goods/ElasticGoodService.php', 'App\\Services\\goods\\ElasticGoodService' => __DIR__ . '/../..' . '/application/services/goods/ElasticGoodService.php',
'App\\Services\\goods\\GoodsService' => __DIR__ . '/../..' . '/application/services/goods/GoodsService.php', 'App\\Services\\goods\\GoodsService' => __DIR__ . '/../..' . '/application/services/goods/GoodsService.php',
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "efdbb7f13f8184d60b56b0fb876b8868147162ac" "reference": "b0d289d91840da2cf8f373f718101e2d0fcff4ae"
}, },
"require": { "require": {
"api/php_utils": "dev-master", "api/php_utils": "dev-master",
"perftools/php-profiler": "^0.18.0", "perftools/php-profiler": "^0.18.0",
"php": ">=7.2" "php": ">=7.2"
}, },
"time": "2021-06-17T09:28:47+00:00", "time": "2021-06-21T13:10:55+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git", "url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "474c015979f967bcd045224c7e4f47c206dcfad7" "reference": "1368a385a7b4bda8d18ecd177209a16731922825"
}, },
"require": { "require": {
"elasticsearch/elasticsearch": "~7.0", "elasticsearch/elasticsearch": "~7.0",
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"mongodb/mongodb": "1.4.3", "mongodb/mongodb": "1.4.3",
"php": ">=7.2" "php": ">=7.2"
}, },
"time": "2021-06-17T12:06:18+00:00", "time": "2021-06-22T06:30:51+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'aaa7a15562bb4388a4d9b639c7623edd5f44e2d7', 'reference' => '2c92ea9e9ceb03dd50ff5f10f4fd2d1273841535',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => 'efdbb7f13f8184d60b56b0fb876b8868147162ac', 'reference' => 'b0d289d91840da2cf8f373f718101e2d0fcff4ae',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => '474c015979f967bcd045224c7e4f47c206dcfad7', 'reference' => '1368a385a7b4bda8d18ecd177209a16731922825',
), ),
'elasticsearch/elasticsearch' => 'elasticsearch/elasticsearch' =>
array ( array (
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => 'aaa7a15562bb4388a4d9b639c7623edd5f44e2d7', 'reference' => '2c92ea9e9ceb03dd50ff5f10f4fd2d1273841535',
), ),
), ),
); );
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