Commit c49394d4 authored by jianghaiming's avatar jianghaiming

Merge branch 'test' of https://gitlab.yidian-inc.com/bp/goods into test

parents 083e0ea6 6a66219b
...@@ -16,6 +16,8 @@ class GoodsException extends BaseException ...@@ -16,6 +16,8 @@ class GoodsException extends BaseException
const OTA_NOT_EXIST = 38; const OTA_NOT_EXIST = 38;
const RULE_LIMIT_ERROR = 50; const RULE_LIMIT_ERROR = 50;
const NOT_FIND_MARKETING = 51; const NOT_FIND_MARKETING = 51;
const LABEL_PRINTER_ALREADY_EXIST = 53;
const PRINTER_BIND_ERROR = 54;
protected $cus = [ protected $cus = [
0 => '商品创建失败,请稍后重试', 0 => '商品创建失败,请稍后重试',
...@@ -71,5 +73,7 @@ class GoodsException extends BaseException ...@@ -71,5 +73,7 @@ class GoodsException extends BaseException
self::RULE_LIMIT_ERROR => '单人可买上限填写错误', self::RULE_LIMIT_ERROR => '单人可买上限填写错误',
self::NOT_FIND_MARKETING => '找不到活动', self::NOT_FIND_MARKETING => '找不到活动',
52 => '过期时间不得小于等于上架开始时间', 52 => '过期时间不得小于等于上架开始时间',
self::LABEL_PRINTER_ALREADY_EXIST => '标签打印机已被%s绑定',
self::PRINTER_BIND_ERROR => '打印机绑定失败:%s',
]; ];
} }
\ No newline at end of file
...@@ -49,4 +49,19 @@ class BaseValidate extends Validate ...@@ -49,4 +49,19 @@ class BaseValidate extends Validate
return false; return false;
} }
} }
protected function isDate($value)
{
//匹配日期格式
if (preg_match("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $value, $parts)) {
//检测是否为日期
if (checkdate($parts[2], $parts[3], $parts[1])) {
return true;
} else {
return false;
}
} else {
return false;
}
}
} }
\ No newline at end of file
...@@ -5,12 +5,12 @@ namespace Validate; ...@@ -5,12 +5,12 @@ namespace Validate;
class ColonelConfigValidate extends BaseValidate class ColonelConfigValidate extends BaseValidate
{ {
protected $rule = [ protected $rule = [
'date' => 'require', 'date' => 'require|isDate',
'config' => 'require', 'config' => 'require',
]; ];
protected $message = [ protected $message = [
'date' => 'date 参数不能为空', 'date' => 'date 参数格式错误',
'config' => 'config 参数不能为空', 'config' => 'config 参数不能为空',
'marketing_id' => 'marketing_id 参数不能为空', 'marketing_id' => 'marketing_id 参数不能为空',
]; ];
......
...@@ -14,6 +14,10 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -14,6 +14,10 @@ class OtaValidate extends \Validate\BaseValidate
protected $rule = [ protected $rule = [
'ota_name' => 'require', 'ota_name' => 'require',
'ota_id' => 'require', 'ota_id' => 'require',
'address' => 'require',
'location' => 'require',
'longitude' => 'require',
'latitude' => 'require',
'offset' => 'egt:0', 'offset' => 'egt:0',
'limit' => 'elt:100', 'limit' => 'elt:100',
]; ];
...@@ -22,6 +26,10 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -22,6 +26,10 @@ class OtaValidate extends \Validate\BaseValidate
protected $message = [ protected $message = [
"ota_name" => "供应商名称不能为空", "ota_name" => "供应商名称不能为空",
"ota_id" => "ota_id不能为空", "ota_id" => "ota_id不能为空",
"address" => "详细地址不能为空",
"location" => "高德地图详细地址不能为空",
"longitude" => "经度不能为空",
"latitude" => "纬度不能为空",
"offset" => "偏移量不能小于0", "offset" => "偏移量不能小于0",
"limit" => "单次不能大于100条", "limit" => "单次不能大于100条",
]; ];
...@@ -34,7 +42,7 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -34,7 +42,7 @@ class OtaValidate extends \Validate\BaseValidate
public function sceneAdd() public function sceneAdd()
{ {
return $this->only(['ota_name']); return $this->only(['ota_name', 'address','longitude','latitude', 'location']);
} }
public function sceneDelete() public function sceneDelete()
{ {
...@@ -43,7 +51,7 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -43,7 +51,7 @@ class OtaValidate extends \Validate\BaseValidate
public function sceneUpdate() public function sceneUpdate()
{ {
return $this->only(['ota_id']); return $this->only(['ota_id', 'ota_name', 'address','longitude','latitude', 'location']);
} }
public function sceneListByIds() public function sceneListByIds()
{ {
......
...@@ -19,7 +19,7 @@ class ColonelDistributorColonelApply extends MysqlBase ...@@ -19,7 +19,7 @@ class ColonelDistributorColonelApply extends MysqlBase
const STATUS_PASS = 1;//审核通过 const STATUS_PASS = 1;//审核通过
const STATUS_REJECT = 2;//审核驳回 const STATUS_REJECT = 2;//审核驳回
const DEFAULT_COLUMN = ['colonel_apply_id','audit_status','user_id','phone','contact_name','take_place_name','province','city','area','location']; const DEFAULT_COLUMN = ['colonel_apply_id','audit_status','user_id','phone','contact_name','take_place_name','province','city','area','location','address'];
public static function insertRecord(array $column) : int public static function insertRecord(array $column) : int
{ {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Models\marketing\mysql; namespace App\Models\marketing\mysql;
use Api\PhpUtils\Mysql\MysqlBase; use Api\PhpUtils\Mysql\MysqlBase;
use App\Services\marketing\MarketingService;
/** /**
* 自提点 * 自提点
...@@ -25,7 +26,7 @@ class TakePlace extends MysqlBase ...@@ -25,7 +26,7 @@ class TakePlace extends MysqlBase
*/ */
public static function searchList($params) public static function searchList($params)
{ {
$lifeAccountId = $params['life_account_id'] ?? 0; $lifeAccountId = $params['life_account_id'] ?? MarketingService::getPublicLifeAccountId();
$keywords = $params['keywords'] ?? ''; $keywords = $params['keywords'] ?? '';
$offset = $params['offset'] ?? 0; $offset = $params['offset'] ?? 0;
$limit = $params['limit'] ?? 20; $limit = $params['limit'] ?? 20;
...@@ -59,6 +60,11 @@ class TakePlace extends MysqlBase ...@@ -59,6 +60,11 @@ class TakePlace extends MysqlBase
return self::get($column, $where); return self::get($column, $where);
} }
public static function getRecords(array $where, $column = '*')
{
return self::select($column, $where);
}
public static function existTakePlaceName(string $takePlaceName) : bool public static function existTakePlaceName(string $takePlaceName) : bool
{ {
$exist = self::getRecord(['take_place_name' => $takePlaceName], ['take_place_id']); $exist = self::getRecord(['take_place_name' => $takePlaceName], ['take_place_id']);
......
...@@ -22,9 +22,11 @@ class OtaController extends Base ...@@ -22,9 +22,11 @@ class OtaController extends Base
$name = $this->params['ota_name'] ?? ''; $name = $this->params['ota_name'] ?? '';
$printerSn = $this->params['printer_sn'] ?? ''; $printerSn = $this->params['printer_sn'] ?? '';
$printerKey = $this->params['printer_key'] ?? ''; $printerKey = $this->params['printer_key'] ?? '';
$labelPrinterSn = $this->params['label_printer_sn'] ?? '';
$labelPrinterKey = $this->params['label_printer_key'] ?? '';
$offset = $this->params['offset'] ?? 0; $offset = $this->params['offset'] ?? 0;
$limit = $this->params['limit'] ?? 20; $limit = $this->params['limit'] ?? 20;
$res = OtaService::list($name, $printerSn, $printerKey, $offset, $limit); $res = OtaService::list($name, $printerSn, $printerKey,$labelPrinterSn, $labelPrinterKey, $offset, $limit);
$this->success(['result' => $res]); $this->success(['result' => $res]);
} }
......
...@@ -13,15 +13,18 @@ use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum; ...@@ -13,15 +13,18 @@ use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum;
use App\Models\marketing\mysql\ColonelDistributorPayInfo; use App\Models\marketing\mysql\ColonelDistributorPayInfo;
use App\Exception\custom\InterfaceException; use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use App\Models\marketing\mysql\Marketing;
use App\Models\user\mysql\UserWechatBind; use App\Models\user\mysql\UserWechatBind;
use App\Services\marketing\PindanActivityColonelConfigService; use App\Services\marketing\PindanActivityColonelConfigService;
use Api\PhpUtils\Log\JobLog; use Api\PhpUtils\Log\JobLog;
use App\Services\marketing\ColonelService;
class ColonelorderController extends Job class ColonelorderController extends Job
{ {
const REWARD_UNIT = 100; // 奖励单位: 分 const REWARD_UNIT = 100; // 奖励单位: 分
const INVITE_NEW_USER_REWARD = 3 * self::REWARD_UNIT; // 邀请新用户奖励 const INVITE_NEW_USER_REWARD = 3 * self::REWARD_UNIT; // 邀请新用户奖励
const DEFAULT_USER_BATCH_SIZE = 100; // 批量处理数据条数 const DEFAULT_USER_BATCH_SIZE = 100; // 批量处理数据条数
const ACTIVITY_OFFLINE_BALANCE = 50 * self::REWARD_UNIT; // 活动余额下线阈值
public $colonelConfigList; // 活动配置 public $colonelConfigList; // 活动配置
public $settlementDate; // 活动结算日 public $settlementDate; // 活动结算日
...@@ -36,10 +39,7 @@ class ColonelorderController extends Job ...@@ -36,10 +39,7 @@ class ColonelorderController extends Job
public function init() public function init()
{ {
parent::init(); parent::init();
$timeRange = PindanActivityColonelConfigService::getSettlementTimeRange(); $this->loadTimeConfig();
$this->settlementDate = $timeRange['date'];
$this->startTime = $timeRange['start_time'];
$this->endTime = $timeRange['end_time'];
$this->colonelConfigList = $this->getColonelConfig($this->settlementDate); $this->colonelConfigList = $this->getColonelConfig($this->settlementDate);
} }
...@@ -62,6 +62,7 @@ class ColonelorderController extends Job ...@@ -62,6 +62,7 @@ class ColonelorderController extends Job
if (!empty($colonelPayInfoData)) { if (!empty($colonelPayInfoData)) {
try { try {
$this->loggerInfo('colonelPayInfoCount=' . count($colonelPayInfoData)); $this->loggerInfo('colonelPayInfoCount=' . count($colonelPayInfoData));
$this->handleMarketingBalance($colonelPayInfoData);
$colonelPayInfoData = $this->getFormatPayInfoData($colonelPayInfoData); $colonelPayInfoData = $this->getFormatPayInfoData($colonelPayInfoData);
$this->handleSavePayInfo($colonelPayInfoData); $this->handleSavePayInfo($colonelPayInfoData);
$this->loggerInfo('success'); $this->loggerInfo('success');
...@@ -204,7 +205,6 @@ class ColonelorderController extends Job ...@@ -204,7 +205,6 @@ class ColonelorderController extends Job
if (empty($url)) { if (empty($url)) {
throw new InterfaceException(['cus' => 0]); throw new InterfaceException(['cus' => 0]);
} }
$res = HttpUtil::get($url, $res = HttpUtil::get($url,
['user_ids' => $userIds, 'start_time' => $startTime, 'end_time' => $endTime]); ['user_ids' => $userIds, 'start_time' => $startTime, 'end_time' => $endTime]);
if (!empty($res['response']['result'])) { if (!empty($res['response']['result'])) {
...@@ -267,6 +267,83 @@ class ColonelorderController extends Job ...@@ -267,6 +267,83 @@ class ColonelorderController extends Job
return (int)ColonelDistributorPayInfo::save($data); return (int)ColonelDistributorPayInfo::save($data);
} }
/**
* Notes: 获取团长分销资余额
* User: pengfei@yidian-inc.com
* Date: 2021/9/9 6:19 下午
* @return array
* @throws Exception
*/
private function getMarketingCapitalPoolBalance(): array
{
if (!$url = config('interface', 'coupon.capitalpool.detail')) {
throw new Exception('没有capitalpool配置');
}
if (!$marketing = ColonelService::getMarketingInfo()) {
throw new Exception('没有获取到资金池');
}
$httpParams = [
'capital_pool_id' => $marketing['capital_pool_id']
];
$response = HttpUtil::post($url, $httpParams, 100000, 3);
$this->loggerInfo("url=$url,request=" . json_encode($httpParams) . ";response=" . json_encode($response));
if (!isset($response['response']['result']['capital_pool_total'])) {
throw new Exception('没有获取到资金池信息');
}
$result = $response['response']['result'];
$balance = ($result['capital_pool_total'] - $result['capital_pool_lock'] - $result['capital_pool_used']);
return [
'marketing_id' => $marketing['marketing_id'],
'balance' => $balance
];
}
/**
* Notes: 检测资金余额,是否下线活动
* User: pengfei@yidian-inc.com
* Date: 2021/9/9 6:29 下午
* @param $colonelPayInfoData
* @throws Exception
*/
private function handleMarketingBalance($colonelPayInfoData)
{
$totalReward = array_sum(array_column($colonelPayInfoData, 'reward'));
$marketing = $this->getMarketingCapitalPoolBalance();
$diffBalance = $marketing['balance'] - $totalReward;
if (0 >= $diffBalance) {
throw new Exception('资金池可用余额不足');
}
// 达到活动下线条件
if (self::ACTIVITY_OFFLINE_BALANCE >= $diffBalance) {
Marketing::updateRecord(
['online_status' => Marketing::ONLINE_STATUS_GUANBI],
['marketing_id' => $marketing['marketing_id']]
);
}
}
/**
* Notes: 加载配置
* User: pengfei@yidian-inc.com
* Date: 2021/9/8 7:43 下午
*/
private function loadTimeConfig()
{
// 如果传入时间-使用指定时间
$params = $this->getRequest()->getParams();
if (empty($params['date']) || !strtotime($params['date'])) {
$timeRange = PindanActivityColonelConfigService::getSettlementTimeRange();
$this->settlementDate = $timeRange['date'];
$this->startTime = $timeRange['start_time'];
$this->endTime = $timeRange['end_time'];
} else {
$hour = PindanActivityColonelConfigService::ACTIVITY_DEFAULT_HOUR;
$this->settlementDate = $params['date'];
$this->startTime = "{$params['date']} $hour:00:00";
$this->endTime = date('Y-m-d H:i:s', strtotime($this->startTime . ' +1 day'));
}
}
/** /**
* Notes: 记录 info 日志 * Notes: 记录 info 日志
* User: pengfei@yidian-inc.com * User: pengfei@yidian-inc.com
......
...@@ -7,22 +7,34 @@ ...@@ -7,22 +7,34 @@
use App\Base\Job; use App\Base\Job;
use App\Models\marketing\mysql\ColonelDistributorPayInfo; use App\Models\marketing\mysql\ColonelDistributorPayInfo;
use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use Api\PhpUtils\Log\JobLog; use Api\PhpUtils\Log\JobLog;
use App\Services\marketing\ColonelService;
class ColonelwalletController extends Job class ColonelwalletController extends Job
{ {
const CAPITAL_POOL_ID = 2; // 资金池id
const CAPITAL_POOL_OP = 200; //200:团长奖励 const CAPITAL_POOL_OP = 200; //200:团长奖励
const WALLET_SERVICE_NAME = 11; // 10生活圈优惠券,11营销活动 const WALLET_SERVICE_NAME = 10; // 10生活圈优惠券,11营销活动
const WALLET_SOURCE_NAME = 1; //使用方名,1生活圈,2主端 const WALLET_SOURCE_NAME = 1; //使用方名,1生活圈,2主端
public $capitalPoolId = null;
/**
* Notes: 初始化-读取配置
* User: pengfei@yidian-inc.com
* Date: 2021/9/10 10:01 上午
*/
public function init()
{
parent::init();
$marketing = ColonelService::getMarketingInfo();
$this->capitalPoolId = $marketing['capital_pool_id'] ?? 0;
}
/** /**
* Notes: 奖励结算脚本 * Notes: 奖励结算脚本
* User: pengfei@yidian-inc.com * User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:03 下午 * Date: 2021/9/9 11:17 上午
* @throws InterfaceException
*/ */
public function indexAction() public function indexAction()
{ {
...@@ -30,14 +42,15 @@ class ColonelwalletController extends Job ...@@ -30,14 +42,15 @@ class ColonelwalletController extends Job
$payInfoList = $this->getPayInfoList(); $payInfoList = $this->getPayInfoList();
$this->loggerInfo('payInfoCount=' . count($payInfoList)); $this->loggerInfo('payInfoCount=' . count($payInfoList));
if (!empty($payInfoList)) { if (!empty($payInfoList)) {
if ($this->deductingInventory($payInfoList)) { try {
if ($this->toWallet($payInfoList)) { if ($this->deductingInventory($payInfoList)) {
if ($this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id'))) { if ($this->toWallet($payInfoList)) {
$this->loggerInfo('success'); $this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id'));
} else {
$this->loggerError('更新状态失败');
} }
} }
$this->loggerInfo('success');
} catch (Exception $e) {
$this->loggerError('error:' . $e->getMessage());
} }
} }
$this->loggerInfo('end'); $this->loggerInfo('end');
...@@ -49,12 +62,12 @@ class ColonelwalletController extends Job ...@@ -49,12 +62,12 @@ class ColonelwalletController extends Job
* Date: 2021/9/3 6:04 下午 * Date: 2021/9/3 6:04 下午
* @param $payInfoList * @param $payInfoList
* @return bool * @return bool
* @throws InterfaceException * @throws Exception
*/ */
private function toWallet($payInfoList): bool private function toWallet($payInfoList): bool
{ {
if (!$url = config('interface', 'wallet.account.transfer')) { if (!$url = config('interface', 'wallet.account.transfer')) {
throw new InterfaceException(['cus' => 0]); throw new Exception('没有wallet.account.transfer配置');
} }
$httpParams = self::getWalletHttpParams(); $httpParams = self::getWalletHttpParams();
$list = []; $list = [];
...@@ -67,7 +80,7 @@ class ColonelwalletController extends Job ...@@ -67,7 +80,7 @@ class ColonelwalletController extends Job
'third_order_id_type' => $payInfo['type'], 'third_order_id_type' => $payInfo['type'],
'third_order_desc' => self::getThirdOrderDesc($payInfo), 'third_order_desc' => self::getThirdOrderDesc($payInfo),
'amount' => $payInfo['reward'], 'amount' => $payInfo['reward'],
'extra' => $payInfo 'extra' => ''
]; ];
} }
$httpParams['list'] = $list; $httpParams['list'] = $list;
...@@ -77,8 +90,7 @@ class ColonelwalletController extends Job ...@@ -77,8 +90,7 @@ class ColonelwalletController extends Job
$this->loggerInfo('调用钱包服务成功,count=' . count($payInfoList)); $this->loggerInfo('调用钱包服务成功,count=' . count($payInfoList));
return true; return true;
} else { } else {
$this->loggerError('调用钱包服务失败,httpParams=' . json_encode($httpParams)); throw new Exception('调用钱包服务失败,httpParams=' . json_encode($httpParams));
return false;
} }
} }
...@@ -89,15 +101,15 @@ class ColonelwalletController extends Job ...@@ -89,15 +101,15 @@ class ColonelwalletController extends Job
* Date: 2021/9/3 6:04 下午 * Date: 2021/9/3 6:04 下午
* @param $payInfoList * @param $payInfoList
* @return bool * @return bool
* @throws InterfaceException * @throws Exception
*/ */
private function deductingInventory($payInfoList): bool private function deductingInventory($payInfoList): bool
{ {
if (!$url = config('interface', 'coupon.capitalpool.grant_user_amount')) { if (!$url = config('interface', 'coupon.capitalpool.grant_user_amount')) {
throw new InterfaceException(['cus' => 0]); throw new Exception('没有grant_user_amount配置');
} }
$httpParams = [ $httpParams = [
'capital_pool_id' => self::CAPITAL_POOL_ID 'capital_pool_id' => $this->capitalPoolId
]; ];
$body = []; $body = [];
foreach ($payInfoList as $payInfo) { foreach ($payInfoList as $payInfo) {
...@@ -117,8 +129,7 @@ class ColonelwalletController extends Job ...@@ -117,8 +129,7 @@ class ColonelwalletController extends Job
$this->loggerInfo('调用资金池服务成功,count=' . count($payInfoList)); $this->loggerInfo('调用资金池服务成功,count=' . count($payInfoList));
return true; return true;
} else { } else {
$this->loggerError('调用资金池服务失败,httpParams=' . json_encode($httpParams)); throw new Exception('调用资金池服务失败,httpParams=' . json_encode($httpParams));
return false;
} }
} }
...@@ -180,17 +191,25 @@ class ColonelwalletController extends Job ...@@ -180,17 +191,25 @@ class ColonelwalletController extends Job
return $desc; return $desc;
} }
/** /**
* Notes: 修改状态 * Notes: 修改状态
* User: pengfei@yidian-inc.com * User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:09 下 * Date: 2021/9/9 11:15 上
* @param array $payInfoIds * @param array $payInfoIds
* @return bool * @return bool
* @throws Exception
*/ */
private function handlePayInfoStatus(array $payInfoIds): bool private function handlePayInfoStatus(array $payInfoIds): bool
{ {
return ColonelDistributorPayInfo::updateRecord(['status' => ColonelDistributorPayInfo::STATUS_USE], $upStatus = ColonelDistributorPayInfo::updateRecord(
['pay_info_id' => $payInfoIds]); ['status' => ColonelDistributorPayInfo::STATUS_USE],
['pay_info_id' => $payInfoIds]
);
if (empty($upStatus)) {
throw new Exception('更新pay_info状态失败.pay_info_ids=' . implode(',',$payInfoIds));
}
return $upStatus;
} }
/** /**
......
...@@ -187,7 +187,7 @@ class MarketingController extends Base ...@@ -187,7 +187,7 @@ class MarketingController extends Base
$this->params['marketing_type'] = Marketing::MARKETING_TYPE_PINDAN;//1分销 2团购 3秒杀 4团餐 $this->params['marketing_type'] = Marketing::MARKETING_TYPE_PINDAN;//1分销 2团购 3秒杀 4团餐
$this->params['online_status'] = Marketing::ONLINE_STATUS_QIDONG;//状态 , 1启用,2关闭,3 到期 $this->params['online_status'] = Marketing::ONLINE_STATUS_QIDONG;//状态 , 1启用,2关闭,3 到期
$this->params['from'] = 1;//1 小程序前台 默认0 后台 $this->params['from'] = 1;//1 小程序前台 默认0 后台
//正在进行中的 //正在进行中的 按结束时间正序
$this->params['sort_field'] = 'end_time'; $this->params['sort_field'] = 'end_time';
$this->params['sort_type'] = 'asc'; $this->params['sort_type'] = 'asc';
$this->params['need_buy_num'] = false; $this->params['need_buy_num'] = false;
...@@ -196,9 +196,9 @@ class MarketingController extends Base ...@@ -196,9 +196,9 @@ class MarketingController extends Base
$list['doing'] = $list['doing'] ? array_column($list['doing'], null, 'marketing_id') : []; $list['doing'] = $list['doing'] ? array_column($list['doing'], null, 'marketing_id') : [];
$marketingIdsDoing = array_keys($list['doing']); $marketingIdsDoing = array_keys($list['doing']);
//当天即将开始的 //当天即将开始的 按开始时间正序
$this->params['page'] = 1; $this->params['page'] = 1;
$this->params['sort_field'] = 'end_time'; $this->params['sort_field'] = 'start_time';
$this->params['sort_type'] = 'asc'; $this->params['sort_type'] = 'asc';
$this->params['need_buy_num'] = false; $this->params['need_buy_num'] = false;
$this->params['activity_status'] = MarketingPindan::ACTIVITY_STATUS_START_TODAY;//1 未开始,2进行中,3已结束, 4当日上新(即将开始) $this->params['activity_status'] = MarketingPindan::ACTIVITY_STATUS_START_TODAY;//1 未开始,2进行中,3已结束, 4当日上新(即将开始)
...@@ -206,7 +206,7 @@ class MarketingController extends Base ...@@ -206,7 +206,7 @@ class MarketingController extends Base
$list['prepare'] = $list['prepare'] ? array_column((array)$list['prepare'], null, 'marketing_id') : []; $list['prepare'] = $list['prepare'] ? array_column((array)$list['prepare'], null, 'marketing_id') : [];
$marketingIdsPrepare = array_keys($list['prepare']); $marketingIdsPrepare = array_keys($list['prepare']);
//已结束的 //已结束的 按结束时间倒序
$this->params['page'] = 1; $this->params['page'] = 1;
$this->params['page_size'] = 10; $this->params['page_size'] = 10;
$this->params['sort_field'] = 'end_time'; $this->params['sort_field'] = 'end_time';
......
...@@ -11,6 +11,8 @@ use Api\PhpServices\Sensitive\Sensitive; ...@@ -11,6 +11,8 @@ use Api\PhpServices\Sensitive\Sensitive;
use Api\PhpUtils\Common\BaseConvert; use Api\PhpUtils\Common\BaseConvert;
use Api\PhpUtils\Common\GoodsSkuId; use Api\PhpUtils\Common\GoodsSkuId;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use Api\PhpUtils\Lock\FrequencyLockUtil;
use Api\PhpUtils\Log\FileLog;
use App\Exception\custom\GoodsException; use App\Exception\custom\GoodsException;
use App\Models\goods\mysql\Category; use App\Models\goods\mysql\Category;
use App\Models\goods\mysql\GoodsOperationRecord; use App\Models\goods\mysql\GoodsOperationRecord;
...@@ -498,11 +500,13 @@ class MarketingPindanGoodsService ...@@ -498,11 +500,13 @@ class MarketingPindanGoodsService
]); ]);
$row = PindanGoodsSku::save([ $row = PindanGoodsSku::save([
"total_amount_sold" => $sku["total_amount_sold"] - $params["num"], "total_amount_sold[-]" => $params["num"],
"total_amount_order" => $sku["total_amount_order"] - $params["num"], "total_amount_order[-]" => $params["num"],
"inventory_rest" => $sku["inventory_rest"] + $params["num"], "inventory_rest[+]" => $params["num"],
], ["goods_sku_id" => $sku["goods_sku_id"], "total_amount_sold[>=]" => $params["num"], "total_amount_order[>=]" => $params["num"]]); ], ["goods_sku_id" => $sku["goods_sku_id"], "total_amount_sold[>=]" => $params["num"], "total_amount_order[>=]" => $params["num"]]);
FileLog::info('goods_refund_log', 'json decode error raw:' . json_encode($params));
if ($row < 1){ if ($row < 1){
PindanGoodsSku::rollback(); PindanGoodsSku::rollback();
GoodsRefundRecord::save([ GoodsRefundRecord::save([
......
...@@ -4,10 +4,11 @@ namespace App\Services\goods; ...@@ -4,10 +4,11 @@ namespace App\Services\goods;
use App\Exception\custom\GoodsException; use App\Exception\custom\GoodsException;
use App\Models\goods\mysql\Ota; use App\Models\goods\mysql\Ota;
use Api\PhpServices\Printer\PrinterFactory;
class OtaService class OtaService
{ {
const COLUMNS = ['ota_id','ota_name','printer_sn','printer_key']; const COLUMNS = ['ota_id','ota_name','printer_sn','printer_key','label_printer_sn','label_printer_key', 'longitude', 'latitude', 'location', 'address', 'status'];
/** /**
* 获取供应商列表(op 后台) * 获取供应商列表(op 后台)
* @param string $otaName * @param string $otaName
...@@ -17,13 +18,15 @@ class OtaService ...@@ -17,13 +18,15 @@ class OtaService
* @param int $limit * @param int $limit
* @return \Api\PhpUtils\Mysql\MysqlBase * @return \Api\PhpUtils\Mysql\MysqlBase
*/ */
public static function list($otaName='',$printerSN='',$printerKey='',$offset=0,$limit=20) public static function list($otaName='',$printerSN='',$printerKey='', $labelPrinterSN='',$labelPrinterKey='',$offset=0,$limit=20)
{ {
$otaName && $where['ota_name'] = $otaName; $otaName && $where['ota_name'] = $otaName;
$printerSN && $where["printer_sn"] = $printerSN; $printerSN && $where["printer_sn"] = $printerSN;
$printerKey && $where['printer_key'] = $printerKey; $printerKey && $where['printer_key'] = $printerKey;
$labelPrinterSN && $where["label_printer_sn"] = $labelPrinterSN;
$labelPrinterKey && $where['label_printer_key'] = $labelPrinterKey;
$where['status'] = Ota::STATUS_NORMAL; // $where['status'] = Ota::STATUS_NORMAL;
$where['ORDER'] = ['ota_id' => 'DESC']; $where['ORDER'] = ['ota_id' => 'DESC'];
$where['LIMIT'] = [$offset, $limit]; $where['LIMIT'] = [$offset, $limit];
...@@ -82,10 +85,52 @@ class OtaService ...@@ -82,10 +85,52 @@ class OtaService
); );
} }
} }
//检查标签打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['label_printer_sn']) && $params['label_printer_sn']) {
$printer = self::list('','', '', $params['label_printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::LABEL_PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
}
try {
if(isset($params['printer_sn']) && $params['printer_sn']) {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['printer_sn'],
'printer_key' => $params['printer_key'],
'ota_name' => $params['ota_name'],
]);
}
if(isset($params['label_printer_sn']) && $params['label_printer_sn']) {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['label_printer_sn'],
'printer_key' => $params['label_printer_key'],
'ota_name' => $params['ota_name'],
]);
}
} catch (\Exception $e) {
throw new GoodsException(
['cus' => GoodsException::PRINTER_BIND_ERROR,'data'=>[$e->getMessage()]]
);
}
$data['ota_name'] = $params['ota_name']; $data['ota_name'] = $params['ota_name'];
$data['printer_sn'] = $params['printer_sn'] ?? ''; $data['printer_sn'] = $params['printer_sn'] ?? '';
$data['printer_key'] = $params['printer_key'] ?? ''; $data['printer_key'] = $params['printer_key'] ?? '';
$data['label_printer_sn'] = $params['label_printer_sn'] ?? '';
$data['label_printer_key'] = $params['label_printer_key'] ?? '';
$data['longitude'] = $params['longitude'];
$data['latitude'] = $params['latitude'];
$data['location'] = $params['location'];
$data['address'] = $params['address'];
return Ota::insert($data); return Ota::insert($data);
} }
...@@ -108,13 +153,40 @@ class OtaService ...@@ -108,13 +153,40 @@ class OtaService
*/ */
public static function update($params) public static function update($params)
{ {
if(empty($params['ota_id'])) { if(empty($params['ota_id'])) {
throw new GoodsException(['cus' => GoodsException::EMPTY_OTA_ID]); throw new GoodsException(['cus' => GoodsException::EMPTY_OTA_ID]);
} }
$otaDetail = self::detail($params['ota_id']);
//检查供应商是否存在 //检查供应商是否存在
if (empty(self::detail($params['ota_id']))) { if (empty($otaDetail)) {
throw new GoodsException(['cus' => GoodsException::OTA_NOT_EXIST]); throw new GoodsException(['cus' => GoodsException::OTA_NOT_EXIST]);
} }
//检查打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['printer_sn']) && $params['printer_sn']) {
$printer = self::list('',$params['printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
}
//检查标签打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['label_printer_sn']) && $params['label_printer_sn']) {
$printer = self::list('','', '', $params['label_printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::LABEL_PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
}
$data = []; $data = [];
isset($params['ota_name']) && $data['ota_name'] = $params['ota_name']; isset($params['ota_name']) && $data['ota_name'] = $params['ota_name'];
isset($params['printer_sn']) && $data['printer_sn'] = $params['printer_sn']; isset($params['printer_sn']) && $data['printer_sn'] = $params['printer_sn'];
......
...@@ -12,6 +12,7 @@ use App\Models\marketing\mysql\ColonelDistributorColonel; ...@@ -12,6 +12,7 @@ use App\Models\marketing\mysql\ColonelDistributorColonel;
use App\Models\marketing\mysql\ColonelDistributorColonelApply; use App\Models\marketing\mysql\ColonelDistributorColonelApply;
use App\Models\marketing\mysql\TakePlace; use App\Models\marketing\mysql\TakePlace;
use App\Models\user\mysql\UserWechatBind; use App\Models\user\mysql\UserWechatBind;
use App\Models\marketing\mysql\Marketing;
use Exception; use Exception;
class ColonelService class ColonelService
...@@ -49,11 +50,11 @@ class ColonelService ...@@ -49,11 +50,11 @@ class ColonelService
$colonelData['take_place_name'] = "【团长】{$colonelData['take_place_name']}"; $colonelData['take_place_name'] = "【团长】{$colonelData['take_place_name']}";
} }
if (!$applyId = ColonelDistributorColonelApply::insertRecord($colonelData)) { if (!$applyId = ColonelDistributorColonelApply::insertRecord($colonelData)) {
throw new MarketingException(MarketingException::COLONEL_APPLY_FAILED); throw new Exception(MarketingException::COLONEL_APPLY_FAILED);
} }
return $applyId; return $applyId;
} catch (Exception $e) { } catch (Exception $e) {
throw new MarketingException(MarketingException::COLONEL_APPLY_FAILED); throw new MarketingException($e->getMessage());
} }
} }
...@@ -124,9 +125,14 @@ class ColonelService ...@@ -124,9 +125,14 @@ class ColonelService
} }
$userIds = array_column($result['result'], 'user_id'); $userIds = array_column($result['result'], 'user_id');
$userMap = self::getUserMap($userIds); $userMap = self::getUserMap($userIds);
$takePlaceMap = self::getTakePlaceMap(array_column($result['result'], 'take_place_id'));
$incomeMap = PindanActivityInviteOrderService::incomeStatistics(["user_ids" => $userIds]); $incomeMap = PindanActivityInviteOrderService::incomeStatistics(["user_ids" => $userIds]);
foreach ($result['result'] as &$colonelVal) { foreach ($result['result'] as &$colonelVal) {
$userId = $colonelVal['user_id']; $userId = $colonelVal['user_id'];
$takePlaceInfo = !empty($takePlaceMap[$colonelVal['take_place_id']]) ? $takePlaceMap[$colonelVal['take_place_id']] : [];
$colonelVal['take_place_name'] = $takePlaceInfo['take_place_name'] ?? '';
$colonelVal['location'] = $takePlaceInfo['location'] ?? '';
$colonelVal['address'] = $takePlaceInfo['address'] ?? '';
$colonelVal['user_avatar'] = !empty($userMap[$userId]['user_avatar']) ? $userMap[$userId]['user_avatar'] : ''; $colonelVal['user_avatar'] = !empty($userMap[$userId]['user_avatar']) ? $userMap[$userId]['user_avatar'] : '';
$colonelVal['no_settlement_income'] = !empty($incomeMap[$userId]['no_settlement']) ? $incomeMap[$userId]['no_settlement'] : 0; $colonelVal['no_settlement_income'] = !empty($incomeMap[$userId]['no_settlement']) ? $incomeMap[$userId]['no_settlement'] : 0;
$colonelVal['total_income'] = !empty($incomeMap[$userId]['all_reward']) ? $incomeMap[$userId]['all_reward'] : 0; $colonelVal['total_income'] = !empty($incomeMap[$userId]['all_reward']) ? $incomeMap[$userId]['all_reward'] : 0;
...@@ -159,25 +165,28 @@ class ColonelService ...@@ -159,25 +165,28 @@ class ColonelService
try { try {
ColonelDistributorColonelApply::beginTransaction(); ColonelDistributorColonelApply::beginTransaction();
// 修改申请状态 // 修改申请状态
$updateStatus = ColonelDistributorColonelApply::updateRecord(['audit_status' => $auditStatus], $updateStatus = ColonelDistributorColonelApply::updateRecord([
['colonel_apply_id' => $applyId, 'audit_status' => ColonelDistributorColonelApply::STATUS_AUDIT] 'audit_status' => $auditStatus,
'update_time' => date('Y-m-d H:i:s')
],
['colonel_apply_id' => $applyId, 'audit_status[!]' => ColonelDistributorColonelApply::STATUS_PASS]
); );
if (empty($updateStatus)) { if (empty($updateStatus)) {
throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS_FAILED); throw new Exception(MarketingException::COLONEL_AUDIT_STATUS_FAILED);
} }
// 审核成功 // 审核成功
if ($auditStatus == ColonelDistributorColonelApply::STATUS_PASS) { if ($auditStatus == ColonelDistributorColonelApply::STATUS_PASS) {
if (!self::handleAuditSuccess((array)$applyInfo)) { if (!self::handleAuditSuccess((array)$applyInfo)) {
throw new MarketingException(MarketingException::COLONEL_ADD_FAILED); throw new Exception(MarketingException::COLONEL_ADD_FAILED);
} }
} }
if (!ColonelDistributorColonelApply::commit()) { if (!ColonelDistributorColonelApply::commit()) {
throw new MarketingException(MarketingException::COMMIT_ERROR); throw new Exception(MarketingException::COMMIT_ERROR);
} }
return true; return true;
} catch (MarketingException $e) { } catch (Exception $e) {
ColonelDistributorColonelApply::rollback(); ColonelDistributorColonelApply::rollback();
throw new MarketingException($e->getCode()); throw new MarketingException($e->getMessage());
} }
} }
...@@ -224,19 +233,19 @@ class ColonelService ...@@ -224,19 +233,19 @@ class ColonelService
ColonelDistributorColonel::beginTransaction(); ColonelDistributorColonel::beginTransaction();
// 添加自提点 // 添加自提点
if (!$takePlaceId = TakePlaceService::add($params)) { if (!$takePlaceId = TakePlaceService::add($params)) {
throw new MarketingException(MarketingException::COLONEL_TAKE_PLACE_FAILED); throw new Exception(MarketingException::COLONEL_TAKE_PLACE_FAILED);
} }
// 修改自提点id // 修改自提点id
if (!ColonelDistributorColonel::updateRecord(['take_place_id' => $takePlaceId], $where)) { if (!ColonelDistributorColonel::updateRecord(['take_place_id' => $takePlaceId], $where)) {
throw new MarketingException(MarketingException::COLONEL_TAKE_PLACE_EDIT_FAILED); throw new Exception(MarketingException::COLONEL_TAKE_PLACE_EDIT_FAILED);
} }
if (!ColonelDistributorColonel::commit()) { if (!ColonelDistributorColonel::commit()) {
throw new MarketingException(MarketingException::COMMIT_ERROR); throw new Exception(MarketingException::COMMIT_ERROR);
} }
return (int)$takePlaceId; return (int)$takePlaceId;
} catch (MarketingException $e) { } catch (Exception $e) {
ColonelDistributorColonel::rollback(); ColonelDistributorColonel::rollback();
throw new MarketingException($e->getCode()); throw new MarketingException($e->getMessage());
} }
} }
...@@ -302,4 +311,34 @@ class ColonelService ...@@ -302,4 +311,34 @@ class ColonelService
$params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20; $params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20;
return $params; return $params;
} }
/**
* Notes: 获取自提点信息
* User: pengfei@yidian-inc.com
* Date: 2021/9/8 6:16 下午
* @param array $takePlaceId
* @return array
*/
private static function getTakePlaceMap(array $takePlaceId): array
{
$takePlaces = TakePlace::getRecords(['take_place_id' => $takePlaceId]);
return array_column((array)$takePlaces, null, 'take_place_id');
}
/**
* Notes: 获取团长分销活动
* User: pengfei@yidian-inc.com
* Date: 2021/9/9 6:06 下午
* @return array
*/
public static function getMarketingInfo(): array
{
$where = [
'marketing_type' => Marketing::MARKETING_TYPE_TUANZHANG,
'ORDER' => ['marketing_id' => 'DESC'],
];
$where['ORDER'] = ["create_time" => "DESC"];
$marketing = Marketing::getRecord($where, ['marketing_id', 'capital_pool_id']);
return (array)$marketing;
}
} }
...@@ -172,7 +172,9 @@ class MarketingService ...@@ -172,7 +172,9 @@ class MarketingService
foreach ($lists as &$val) { foreach ($lists as &$val) {
if($capitalPoolList[$val['capital_pool_id']]) { if($capitalPoolList[$val['capital_pool_id']]) {
$val['capital_pool'] = $capitalPoolList[$val['capital_pool_id']]; $val['capital_pool'] = $capitalPoolList[$val['capital_pool_id']];
foreach (['capital_pool_total','capital_pool_lock','capital_pool_used'] as $key){
$val['capital_pool'][$key] = sprintf("%0.02f",$val['capital_pool'][$key]/100);
}
$poolTotal += $val['capital_pool']['capital_pool_total']; $poolTotal += $val['capital_pool']['capital_pool_total'];
$poolUsed += $val['capital_pool']['capital_pool_used']; $poolUsed += $val['capital_pool']['capital_pool_used'];
$poolLock += $val['capital_pool']['capital_pool_lock']; $poolLock += $val['capital_pool']['capital_pool_lock'];
...@@ -1094,6 +1096,7 @@ class MarketingService ...@@ -1094,6 +1096,7 @@ class MarketingService
$marketingData["life_account_name"] = $marketingData["life_account_icon"] = ""; $marketingData["life_account_name"] = $marketingData["life_account_icon"] = "";
if (!empty($lifeAccountList[$pindanMarketing["publish_life_account_id"]])) { if (!empty($lifeAccountList[$pindanMarketing["publish_life_account_id"]])) {
$marketingData["life_account_admin_id"] = strval($lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_admin_id"]);//客户端需要字符串格式
$marketingData["life_account_name"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_name"]; $marketingData["life_account_name"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_name"];
$marketingData["life_account_icon"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_icon"]; $marketingData["life_account_icon"] = $lifeAccountList[$pindanMarketing["publish_life_account_id"]]["life_account_icon"];
$marketingData["life_account_register_days"] = self::countAccountRegisterDays($lifeAccountList[$pindanMarketing["publish_life_account_id"]]['create_time']); $marketingData["life_account_register_days"] = self::countAccountRegisterDays($lifeAccountList[$pindanMarketing["publish_life_account_id"]]['create_time']);
......
...@@ -23,9 +23,11 @@ class PindanActivityColonelConfigService ...@@ -23,9 +23,11 @@ class PindanActivityColonelConfigService
{ {
$date = $params["date"]; $date = $params["date"];
$today = date("Y-m-d"); $today = date("Y-m-d");
if ($date <= $today) { $hour = date("H");
if ($date < $today || ($date == $today && $hour >= 12)) {
throw new MarketingException(['cus' => MarketingException::COLONEL_DATE_ERROR]); throw new MarketingException(['cus' => MarketingException::COLONEL_DATE_ERROR]);
} }
$type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"]; $type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"];
$configList = $params["config"]; $configList = $params["config"];
$marketingId = $params["marketing_id"]; $marketingId = $params["marketing_id"];
......
...@@ -35,9 +35,10 @@ class PindanActivityInviteOrderService ...@@ -35,9 +35,10 @@ class PindanActivityInviteOrderService
return true; return true;
} }
$timeRange = PindanActivityColonelConfigService::getActivityTimeRange();
$inviteOrderNumData = [ $inviteOrderNumData = [
"colonel_user_id" => $params["colonel_user_id"], "colonel_user_id" => $params["colonel_user_id"],
"date" => date("Y-m-d") "date" => $timeRange['date']
]; ];
$inviteOrderNum = ColonelDistributorInviteOrderNum::selectMaster("*", $inviteOrderNumData, []); $inviteOrderNum = ColonelDistributorInviteOrderNum::selectMaster("*", $inviteOrderNumData, []);
...@@ -142,7 +143,7 @@ class PindanActivityInviteOrderService ...@@ -142,7 +143,7 @@ class PindanActivityInviteOrderService
$timeRange = self::getNoSettlementTimeRange(); $timeRange = self::getNoSettlementTimeRange();
$inviteOrderNumList = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num", "date"], [ $inviteOrderNumList = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num", "date"], [
"create_time[>]" => $timeRange["start_time"], "create_time[>]" => $timeRange["start_time"],
"create_time[<]" => $timeRange["end_time"], "colonel_user_id" => $userIds,
], []); ], []);
$inviteOrderNumData = []; $inviteOrderNumData = [];
$inviteOrderStatistics = []; $inviteOrderStatistics = [];
...@@ -212,7 +213,8 @@ class PindanActivityInviteOrderService ...@@ -212,7 +213,8 @@ class PindanActivityInviteOrderService
} else { } else {
$startTime = date('Y-m-d', strtotime('-2 day')).$hour; $startTime = date('Y-m-d', strtotime('-2 day')).$hour;
} }
$endTime = date("Y-m-d").$hour; //$endTime = date("Y-m-d").$hour;
$endTime = date("Y-m-d H:i:s"); // 结束时间应该取当前时间
return [ return [
'start_time' => $startTime, 'start_time' => $startTime,
...@@ -269,14 +271,18 @@ class PindanActivityInviteOrderService ...@@ -269,14 +271,18 @@ class PindanActivityInviteOrderService
} }
/** /**
* 团长分销,昨日转化单数,总转化单数 * 团长分销,累计转化单数
* @param array $params * @param array $params
* @return array * @return array
*/ */
public static function inviteOrderNumberStatistics($params = []) public static function inviteOrderNumberStatistics($params = [])
{ {
$timeRange = self::getNoSettlementTimeRange();
$userIds = $params["user_ids"]; $userIds = $params["user_ids"];
$allNums = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num"], ["colonel_user_id" => $userIds], []); $allNums = ColonelDistributorInviteOrderNum::select(
["colonel_user_id", "num"],
["colonel_user_id" => $userIds, "create_time[<]" => $timeRange["start_time"]], []);
$allData = array_column($allNums, null, "colonel_user_id"); $allData = array_column($allNums, null, "colonel_user_id");
$data = []; $data = [];
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Services\tcc; namespace App\Services\tcc;
use Api\PhpUtils\Common\GoodsSkuId; use Api\PhpUtils\Common\GoodsSkuId;
use Api\PhpUtils\Log\FileLog;
use App\Exception\custom\GoodsException; use App\Exception\custom\GoodsException;
use App\Models\goods\mysql\GoodsSku; use App\Models\goods\mysql\GoodsSku;
use App\Models\goods\mysql\PindanGoodsSku; use App\Models\goods\mysql\PindanGoodsSku;
...@@ -491,7 +492,7 @@ class Tcc2Service ...@@ -491,7 +492,7 @@ class Tcc2Service
} }
} }
} }
FileLog::info('goods_cancel_confirm_tcc', 'json decode error raw:' . $keys);
if ($isPindan) { if ($isPindan) {
return self::pindanCancelConfirm($goodsInfoList); return self::pindanCancelConfirm($goodsInfoList);
} else { } else {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"php": "7.2.*", "php": "7.2.*",
"ext-json": "*", "ext-json": "*",
"api/php_utils":"1.0.17", "api/php_utils":"1.0.17",
"api/php_services":"1.0.13", "api/php_services":"1.0.14",
"ext-openssl": "*" "ext-openssl": "*"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "2ccd591433ba03459f132b1bc9aef07c", "content-hash": "6b8ea7dcd025a3916d9804461968836b",
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "v1.0.13", "version": "1.0.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": "c51c248e6e7aba33fd147993b5f61f140ccd56ca" "reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
}, },
"description": "bp api php_services", "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", "name": "api/php_utils",
...@@ -67,13 +67,7 @@ ...@@ -67,13 +67,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"dasprid/enum": "^1.0.3", "dasprid/enum": "^1.0.3",
...@@ -126,13 +120,7 @@ ...@@ -126,13 +120,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
"reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9", "phpunit/phpunit": "^7 | ^8 | ^9",
...@@ -179,13 +167,7 @@ ...@@ -179,13 +167,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf", "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf", "reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": ">=1.3.7", "ext-json": ">=1.3.7",
...@@ -254,13 +236,7 @@ ...@@ -254,13 +236,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",
...@@ -335,13 +311,7 @@ ...@@ -335,13 +311,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8", "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8",
"reference": "abe3791d231167f14eb80d413420d1eab91163a8", "reference": "abe3791d231167f14eb80d413420d1eab91163a8",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -395,13 +365,7 @@ ...@@ -395,13 +365,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b", "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b", "reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ezimuel/guzzlestreams": "^3.0.1", "ezimuel/guzzlestreams": "^3.0.1",
...@@ -456,13 +420,7 @@ ...@@ -456,13 +420,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"guzzlehttp/promises": "^1.0", "guzzlehttp/promises": "^1.0",
...@@ -531,13 +489,7 @@ ...@@ -531,13 +489,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=5.5"
...@@ -622,13 +574,7 @@ ...@@ -622,13 +574,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "9d006741ba865a45adccfac45d8e1053086a5a3f", "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -724,13 +670,7 @@ ...@@ -724,13 +670,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1", "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1", "reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -785,13 +725,7 @@ ...@@ -785,13 +725,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96", "reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-hash": "*", "ext-hash": "*",
...@@ -855,13 +789,7 @@ ...@@ -855,13 +789,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
"reference": "d178027d1e679832db9f38248fcc7200647dc2b7", "reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -921,13 +849,7 @@ ...@@ -921,13 +849,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -989,13 +911,7 @@ ...@@ -989,13 +911,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -1049,13 +965,7 @@ ...@@ -1049,13 +965,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -1105,13 +1015,7 @@ ...@@ -1105,13 +1015,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -1155,13 +1059,7 @@ ...@@ -1155,13 +1059,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -1221,13 +1119,7 @@ ...@@ -1221,13 +1119,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1295,13 +1187,7 @@ ...@@ -1295,13 +1187,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1370,13 +1256,7 @@ ...@@ -1370,13 +1256,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1456,13 +1336,7 @@ ...@@ -1456,13 +1336,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1544,13 +1418,7 @@ ...@@ -1544,13 +1418,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1635,13 +1503,7 @@ ...@@ -1635,13 +1503,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1722,13 +1584,7 @@ ...@@ -1722,13 +1584,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1808,13 +1664,7 @@ ...@@ -1808,13 +1664,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1898,13 +1748,7 @@ ...@@ -1898,13 +1748,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212", "url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212",
"reference": "7831b0331b786db39026d190faa4914f94adb212", "reference": "7831b0331b786db39026d190faa4914f94adb212",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1979,19 +1823,13 @@ ...@@ -1979,19 +1823,13 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/property-info.git", "url": "https://github.com/symfony/property-info.git",
"reference": "3565216f9640b26b646855e39e7bfafc550c75db" "reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/3565216f9640b26b646855e39e7bfafc550c75db", "url": "https://api.github.com/repos/symfony/property-info/zipball/903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"reference": "3565216f9640b26b646855e39e7bfafc550c75db", "reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -2067,7 +1905,7 @@ ...@@ -2067,7 +1905,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-08-23T12:58:54+00:00" "time": "2021-09-07T15:45:17+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
...@@ -2081,13 +1919,7 @@ ...@@ -2081,13 +1919,7 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -2171,5 +2003,5 @@ ...@@ -2171,5 +2003,5 @@
"ext-openssl": "*" "ext-openssl": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.1.0" "plugin-api-version": "2.0.0"
} }
type=command type=command
command=bash docker run --rm -e LANG=en_US.UTF-8 -e TZ=Asia/Shanghai --net=bridge -h "`hostname`" --cap-add SYS_PTRACE --privileged docker2.yidian.com:5000/publish/bp-goods-azkaban-test-10-image /bin/bash -c "cd /home/services && sh start_job.sh test ColonelOrder index a=3&b=4" command=docker run --rm -e YIDIAN_LOCAL_IP=10.138.0.27 -e YIDIAN_LOCAL_PORT= -e ORIGIN_SERVICE_PORT= -e LANG=en_US.UTF-8 -e TZ=Asia/Shanghai --net=bridge -h "`hostname`" --cap-add SYS_PTRACE --privileged docker2.yidian.com:5000/publish/bp-goods-azkaban-test-107-image /bin/bash -c "sysctl -w net.core.somaxconn=65535 && cd /home/services && sh start_job.sh test Colonelorder index a=3"
\ No newline at end of file \ No newline at end of file
type=command type=command
command=bash docker run --rm -e LANG=en_US.UTF-8 -e TZ=Asia/Shanghai --net=bridge -h "`hostname`" --cap-add SYS_PTRACE --privileged docker2.yidian.com:5000/publish/bp-goods-azkaban-test-10-image /bin/bash -c "cd /home/services && sh start_job.sh test ColonelWallet index a=3&b=4" command=docker run --rm -e YIDIAN_LOCAL_IP=10.138.0.27 -e YIDIAN_LOCAL_PORT= -e ORIGIN_SERVICE_PORT= -e LANG=en_US.UTF-8 -e TZ=Asia/Shanghai --net=bridge -h "`hostname`" --cap-add SYS_PTRACE --privileged docker2.yidian.com:5000/publish/bp-goods-azkaban-test-107-image /bin/bash -c "sysctl -w net.core.somaxconn=65535 && cd /home/services && sh start_job.sh test Colonelwallet index a=3"
dependencies=run-colonel-order dependencies=run-colonel-order
\ No newline at end of file
...@@ -37,8 +37,17 @@ class JwUser ...@@ -37,8 +37,17 @@ class JwUser
} }
$params = ["mobilePhone" => $params['mobile']]; $params = ["mobilePhone" => $params['mobile']];
//$user_info = (new TimeOut())->runGet($url, $params); $begin = microtime(true);
$user_info = (new Request())->get($url, $params); $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)); FileLog::info('jw_user_getUserInfo', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -61,7 +70,6 @@ class JwUser ...@@ -61,7 +70,6 @@ class JwUser
} }
$params = ["userId" => $params['user_id']]; $params = ["userId" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params);
$begin = microtime(true); $begin = microtime(true);
$user_info = (new Request())->post($url, $params); $user_info = (new Request())->post($url, $params);
$end = microtime(true); $end = microtime(true);
...@@ -71,7 +79,9 @@ class JwUser ...@@ -71,7 +79,9 @@ class JwUser
} else { } else {
$code = -1; $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)); FileLog::info('jw_user_getUserByUserId', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -91,8 +101,17 @@ class JwUser ...@@ -91,8 +101,17 @@ class JwUser
} }
$params = ["userIds" => $params['user_id']]; $params = ["userIds" => $params['user_id']];
//$user_info = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$user_info = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('jw_user_getUserList', json_encode($user_info));
if (!$user_info) { if (!$user_info) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -139,7 +158,17 @@ class JwUser ...@@ -139,7 +158,17 @@ class JwUser
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$pushToken = (new TimeOut())->runPost($url, $params); //$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)); FileLog::info('jw_user_savePushToken', json_encode($pushToken));
if (!$pushToken) { if (!$pushToken) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -163,8 +192,17 @@ class JwUser ...@@ -163,8 +192,17 @@ class JwUser
} }
$params = ["userIds" => $params['user_id']]; $params = ["userIds" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('jw_user_getUserListWithDynamic', json_encode($list));
if (!$list) { if (!$list) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -188,8 +226,17 @@ class JwUser ...@@ -188,8 +226,17 @@ class JwUser
} }
$params = ["userId" => $params['user_id']]; $params = ["userId" => $params['user_id']];
//$list = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$list = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('jw_user_getUserDigg', json_encode($list));
if (!$list) { if (!$list) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -206,8 +253,17 @@ class JwUser ...@@ -206,8 +253,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('jw_user_saveUpdateLife', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -224,8 +280,17 @@ class JwUser ...@@ -224,8 +280,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
...@@ -243,8 +308,17 @@ class JwUser ...@@ -243,8 +308,17 @@ class JwUser
if (!$url) { if (!$url) {
throw new CodeSpecialException("failed"); throw new CodeSpecialException("failed");
} }
//$ret = (new TimeOut())->runPost($url, $params); $begin = microtime(true);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user'); $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)); FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) { if (!$ret) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
......
...@@ -338,7 +338,7 @@ class ClassLoader ...@@ -338,7 +338,7 @@ class ClassLoader
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return true|null True if loaded, null otherwise * @return bool|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
...@@ -347,8 +347,6 @@ class ClassLoader ...@@ -347,8 +347,6 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
......
<?php <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer; namespace Composer;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require it's presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions class InstalledVersions
{ {
private static $installed; private static $installed = array (
private static $canGetVendors; 'root' =>
private static $installedByVendor = array(); array (
'pretty_version' => 'dev-develop',
/** 'version' => 'dev-develop',
* Returns a list of all package names which are present, either by being installed, replaced or provided 'aliases' =>
* array (
* @return string[] ),
* @psalm-return list<string> 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
*/ 'name' => 'yidian/yaf_demo',
public static function getInstalledPackages() ),
{ 'versions' =>
$packages = array(); array (
foreach (self::getInstalled() as $installed) { 'api/php_services' =>
$packages[] = array_keys($installed['versions']); array (
} 'pretty_version' => '1.0.14',
'version' => '1.0.14.0',
if (1 === \count($packages)) { 'aliases' =>
return $packages[0]; array (
} ),
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); ),
} 'api/php_utils' =>
array (
/** 'pretty_version' => 'v1.0.17',
* Returns a list of all package names with a specific type e.g. 'library' 'version' => '1.0.17.0',
* 'aliases' =>
* @param string $type array (
* @return string[] ),
* @psalm-return list<string> 'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87',
*/ ),
public static function getInstalledPackagesByType($type) 'bacon/bacon-qr-code' =>
{ array (
$packagesByType = array(); 'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
foreach (self::getInstalled() as $installed) { 'aliases' =>
foreach ($installed['versions'] as $name => $package) { array (
if (isset($package['type']) && $package['type'] === $type) { ),
$packagesByType[] = $name; 'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
} ),
} 'dasprid/enum' =>
} array (
'pretty_version' => '1.0.3',
return $packagesByType; 'version' => '1.0.3.0',
} 'aliases' =>
array (
/** ),
* Checks whether the given package is installed 'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
* ),
* This also returns true if the package name is provided or replaced by another package 'elasticsearch/elasticsearch' =>
* array (
* @param string $packageName 'pretty_version' => '7.11.x-dev',
* @param bool $includeDevRequirements 'version' => '7.11.9999999.9999999-dev',
* @return bool 'aliases' =>
*/ array (
public static function isInstalled($packageName, $includeDevRequirements = true) ),
{ 'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
foreach (self::getInstalled() as $installed) { ),
if (isset($installed['versions'][$packageName])) { 'endroid/qr-code' =>
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); array (
} 'pretty_version' => '3.9.6',
} 'version' => '3.9.6.0',
'aliases' =>
return false; array (
} ),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
/** ),
* Checks whether the given package satisfies a version constraint 'ezimuel/guzzlestreams' =>
* array (
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: 'pretty_version' => 'dev-master',
* 'version' => 'dev-master',
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') 'aliases' =>
* array (
* @param VersionParser $parser Install composer/semver to have access to this class and functionality 0 => '3.0.x-dev',
* @param string $packageName ),
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package 'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
* @return bool ),
*/ 'ezimuel/ringphp' =>
public static function satisfies(VersionParser $parser, $packageName, $constraint) array (
{ 'pretty_version' => 'dev-master',
$constraint = $parser->parseConstraints($constraint); 'version' => 'dev-master',
$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 'aliases' =>
array (
return $provided->matches($constraint); 0 => '1.1.x-dev',
} ),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
/** ),
* Returns a version constraint representing all the range(s) which are installed for a given package 'guzzlehttp/guzzle' =>
* array (
* It is easier to use this via isInstalled() with the $constraint argument if you need to check 'pretty_version' => '6.3.0',
* whether a given version of a package is installed, and not just whether it exists 'version' => '6.3.0.0',
* 'aliases' =>
* @param string $packageName array (
* @return string Version constraint usable with composer/semver ),
*/ 'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
public static function getVersionRanges($packageName) ),
{ 'guzzlehttp/promises' =>
foreach (self::getInstalled() as $installed) { array (
if (!isset($installed['versions'][$packageName])) { 'pretty_version' => 'dev-master',
continue; 'version' => 'dev-master',
} 'aliases' =>
array (
$ranges = array(); 0 => '1.4.x-dev',
if (isset($installed['versions'][$packageName]['pretty_version'])) { ),
$ranges[] = $installed['versions'][$packageName]['pretty_version']; 'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa',
} ),
if (array_key_exists('aliases', $installed['versions'][$packageName])) { 'guzzlehttp/psr7' =>
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); array (
} 'pretty_version' => '1.x-dev',
if (array_key_exists('replaced', $installed['versions'][$packageName])) { 'version' => '1.9999999.9999999.9999999-dev',
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); 'aliases' =>
} array (
if (array_key_exists('provided', $installed['versions'][$packageName])) { ),
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); 'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f',
} ),
'khanamiryan/qrcode-detector-decoder' =>
return implode(' || ', $ranges); array (
} 'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2',
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 'aliases' =>
} array (
),
/** 'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
* @param string $packageName ),
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present 'mongodb/mongodb' =>
*/ array (
public static function getVersion($packageName) 'pretty_version' => '1.4.3',
{ 'version' => '1.4.3.0',
foreach (self::getInstalled() as $installed) { 'aliases' =>
if (!isset($installed['versions'][$packageName])) { array (
continue; ),
} 'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
),
if (!isset($installed['versions'][$packageName]['version'])) { 'myclabs/php-enum' =>
return null; array (
} 'pretty_version' => '1.7.7',
'version' => '1.7.7.0',
return $installed['versions'][$packageName]['version']; 'aliases' =>
} array (
),
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
} ),
'perftools/php-profiler' =>
/** array (
* @param string $packageName 'pretty_version' => '0.18.0',
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present 'version' => '0.18.0.0',
*/ 'aliases' =>
public static function getPrettyVersion($packageName) array (
{ ),
foreach (self::getInstalled() as $installed) { 'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
if (!isset($installed['versions'][$packageName])) { ),
continue; 'psr/http-message' =>
} array (
'pretty_version' => 'dev-master',
if (!isset($installed['versions'][$packageName]['pretty_version'])) { 'version' => 'dev-master',
return null; 'aliases' =>
} array (
0 => '1.0.x-dev',
return $installed['versions'][$packageName]['pretty_version']; ),
} 'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
),
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 'psr/http-message-implementation' =>
} array (
'provided' =>
/** array (
* @param string $packageName 0 => '1.0',
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference ),
*/ ),
public static function getReference($packageName) 'psr/log' =>
{ array (
foreach (self::getInstalled() as $installed) { 'pretty_version' => '1.1.4',
if (!isset($installed['versions'][$packageName])) { 'version' => '1.1.4.0',
continue; 'aliases' =>
} array (
),
if (!isset($installed['versions'][$packageName]['reference'])) { 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
return null; ),
} 'ralouphie/getallheaders' =>
array (
return $installed['versions'][$packageName]['reference']; 'pretty_version' => '3.0.3',
} 'version' => '3.0.3.0',
'aliases' =>
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); array (
} ),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
/** ),
* @param string $packageName 'react/promise' =>
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. array (
*/ 'pretty_version' => '2.x-dev',
public static function getInstallPath($packageName) 'version' => '2.9999999.9999999.9999999-dev',
{ 'aliases' =>
foreach (self::getInstalled() as $installed) { array (
if (!isset($installed['versions'][$packageName])) { ),
continue; 'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
} ),
'symfony/deprecation-contracts' =>
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; array (
} 'pretty_version' => 'dev-main',
'version' => 'dev-main',
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); 'aliases' =>
} array (
0 => '2.5.x-dev',
/** ),
* @return array 'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} ),
*/ 'symfony/options-resolver' =>
public static function getRootPackage() array (
{ 'pretty_version' => '5.4.x-dev',
$installed = self::getInstalled(); 'version' => '5.4.9999999.9999999-dev',
'aliases' =>
return $installed[0]['root']; array (
} ),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
/** ),
* Returns the raw installed.php data for custom implementations 'symfony/polyfill-ctype' =>
* array (
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 'pretty_version' => 'dev-main',
* @return array[] 'version' => 'dev-main',
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} 'aliases' =>
*/ array (
public static function getRawData() 0 => '1.23.x-dev',
{ ),
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
),
if (null === self::$installed) { 'symfony/polyfill-intl-grapheme' =>
// only require the installed.php file if this file is loaded from its dumped location, array (
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 'pretty_version' => 'dev-main',
if (substr(__DIR__, -8, 1) !== 'C') { 'version' => 'dev-main',
self::$installed = include __DIR__ . '/installed.php'; 'aliases' =>
} else { array (
self::$installed = array(); 0 => '1.23.x-dev',
} ),
} 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
),
return self::$installed; 'symfony/polyfill-intl-normalizer' =>
} array (
'pretty_version' => 'dev-main',
/** 'version' => 'dev-main',
* Returns the raw data of all installed.php which are currently loaded for custom implementations 'aliases' =>
* array (
* @return array[] 0 => '1.23.x-dev',
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> ),
*/ 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
public static function getAllRawData() ),
{ 'symfony/polyfill-mbstring' =>
return self::getInstalled(); array (
} 'pretty_version' => 'dev-main',
'version' => 'dev-main',
/** 'aliases' =>
* Lets you reload the static array from another file array (
* 0 => '1.23.x-dev',
* This is only useful for complex integrations in which a project needs to use ),
* this class but then also needs to execute another project's autoloader in process, 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
* and wants to ensure both projects have access to their version of installed.php. ),
* 'symfony/polyfill-php73' =>
* A typical case would be PHPUnit, where it would need to make sure it reads all array (
* the data it needs from this class, then call reload() with 'pretty_version' => 'dev-main',
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure 'version' => 'dev-main',
* the project in which it runs can then also use this class safely, without 'aliases' =>
* interference between PHPUnit's dependencies and the project's dependencies. array (
* 0 => '1.23.x-dev',
* @param array[] $data A vendor/composer/installed.php data set ),
* @return void 'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
* ),
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data 'symfony/polyfill-php80' =>
*/ array (
public static function reload($data) 'pretty_version' => 'dev-main',
{ 'version' => 'dev-main',
self::$installed = $data; 'aliases' =>
self::$installedByVendor = array(); array (
} 0 => '1.23.x-dev',
),
/** 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
* @return array[] ),
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}> 'symfony/property-access' =>
*/ array (
private static function getInstalled() 'pretty_version' => '5.4.x-dev',
{ 'version' => '5.4.9999999.9999999-dev',
if (null === self::$canGetVendors) { 'aliases' =>
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); array (
} ),
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
$installed = array(); ),
'symfony/property-info' =>
if (self::$canGetVendors) { array (
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 'pretty_version' => '5.4.x-dev',
if (isset(self::$installedByVendor[$vendorDir])) { 'version' => '5.4.9999999.9999999-dev',
$installed[] = self::$installedByVendor[$vendorDir]; 'aliases' =>
} elseif (is_file($vendorDir.'/composer/installed.php')) { array (
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; ),
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 'reference' => '903f3f3f6a360bc4739f8390e5031acc70d9cd9f',
self::$installed = $installed[count($installed) - 1]; ),
} 'symfony/string' =>
} array (
} 'pretty_version' => '5.4.x-dev',
} 'version' => '5.4.9999999.9999999-dev',
'aliases' =>
if (null === self::$installed) { array (
// only require the installed.php file if this file is loaded from its dumped location, ),
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
if (substr(__DIR__, -8, 1) !== 'C') { ),
self::$installed = require __DIR__ . '/installed.php'; 'yidian/yaf_demo' =>
} else { array (
self::$installed = array(); 'pretty_version' => 'dev-develop',
} 'version' => 'dev-develop',
} 'aliases' =>
$installed[] = self::$installed; array (
),
return $installed; 'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
} ),
),
);
private static $canGetVendors;
private static $installedByVendor = array();
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
public static function isInstalled($packageName)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}
return false;
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
}
}
}
$installed[] = self::$installed;
return $installed;
}
} }
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "v1.0.13", "version": "1.0.14",
"version_normalized": "1.0.13.0", "version_normalized": "1.0.14.0",
"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": "c51c248e6e7aba33fd147993b5f61f140ccd56ca" "reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
"perftools/php-profiler": "^0.18.0", "perftools/php-profiler": "^0.18.0",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-09-02T06:50:55+00:00", "time": "2021-09-08T06:38:07+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
"autoload": { "autoload": {
......
<?php return array( <?php return array (
'root' => array( 'root' =>
'pretty_version' => 'dev-develop', array (
'version' => 'dev-develop', 'pretty_version' => 'dev-develop',
'type' => 'project', 'version' => 'dev-develop',
'install_path' => __DIR__ . '/../../', 'aliases' =>
'aliases' => array(), array (
'reference' => '26f3230dd97d1da1840255c71dd2c03ec79c3fcf',
'name' => 'yidian/yaf_demo',
'dev' => true,
),
'versions' => array(
'api/php_services' => array(
'pretty_version' => 'v1.0.13',
'version' => '1.0.13.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_services',
'aliases' => array(),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
'dev_requirement' => false,
),
'api/php_utils' => array(
'pretty_version' => 'v1.0.17',
'version' => '1.0.17.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_utils',
'aliases' => array(),
'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87',
'dev_requirement' => false,
),
'bacon/bacon-qr-code' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../bacon/bacon-qr-code',
'aliases' => array(),
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
'dev_requirement' => false,
),
'dasprid/enum' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../dasprid/enum',
'aliases' => array(),
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
'dev_requirement' => false,
),
'elasticsearch/elasticsearch' => array(
'pretty_version' => '7.11.x-dev',
'version' => '7.11.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../elasticsearch/elasticsearch',
'aliases' => array(),
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
'dev_requirement' => false,
),
'endroid/qr-code' => array(
'pretty_version' => '3.9.6',
'version' => '3.9.6.0',
'type' => 'library',
'install_path' => __DIR__ . '/../endroid/qr-code',
'aliases' => array(),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
'dev_requirement' => false,
),
'ezimuel/guzzlestreams' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../ezimuel/guzzlestreams',
'aliases' => array(
0 => '3.0.x-dev',
),
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
'dev_requirement' => false,
),
'ezimuel/ringphp' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../ezimuel/ringphp',
'aliases' => array(
0 => '1.1.x-dev',
),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
'pretty_version' => '6.3.0',
'version' => '6.3.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(
0 => '1.4.x-dev',
),
'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa',
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
'pretty_version' => '1.x-dev',
'version' => '1.9999999.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f',
'dev_requirement' => false,
),
'khanamiryan/qrcode-detector-decoder' => array(
'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2',
'type' => 'library',
'install_path' => __DIR__ . '/../khanamiryan/qrcode-detector-decoder',
'aliases' => array(),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
'dev_requirement' => false,
),
'mongodb/mongodb' => array(
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../mongodb/mongodb',
'aliases' => array(),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
'dev_requirement' => false,
),
'myclabs/php-enum' => array(
'pretty_version' => '1.7.7',
'version' => '1.7.7.0',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/php-enum',
'aliases' => array(),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
'dev_requirement' => false,
),
'perftools/php-profiler' => array(
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../perftools/php-profiler',
'aliases' => array(),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
'dev_requirement' => false,
),
'psr/http-message' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(
0 => '1.0.x-dev',
),
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
'dev_requirement' => false,
),
'psr/http-message-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/log' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'dev_requirement' => false,
),
'ralouphie/getallheaders' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../ralouphie/getallheaders',
'aliases' => array(),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'dev_requirement' => false,
),
'react/promise' => array(
'pretty_version' => '2.x-dev',
'version' => '2.9999999.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../react/promise',
'aliases' => array(),
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(
0 => '2.5.x-dev',
),
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
'dev_requirement' => false,
),
'symfony/options-resolver' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/options-resolver',
'aliases' => array(),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
'dev_requirement' => false,
),
'symfony/polyfill-php73' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
'dev_requirement' => false,
),
'symfony/property-access' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/property-access',
'aliases' => array(),
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
'dev_requirement' => false,
),
'symfony/property-info' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/property-info',
'aliases' => array(),
'reference' => '3565216f9640b26b646855e39e7bfafc550c75db',
'dev_requirement' => false,
),
'symfony/string' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
'dev_requirement' => false,
),
'yidian/yaf_demo' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '26f3230dd97d1da1840255c71dd2c03ec79c3fcf',
'dev_requirement' => false,
),
), ),
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => '1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
),
'api/php_utils' =>
array (
'pretty_version' => 'v1.0.17',
'version' => '1.0.17.0',
'aliases' =>
array (
),
'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87',
),
'bacon/bacon-qr-code' =>
array (
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'aliases' =>
array (
),
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
),
'dasprid/enum' =>
array (
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'aliases' =>
array (
),
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
),
'elasticsearch/elasticsearch' =>
array (
'pretty_version' => '7.11.x-dev',
'version' => '7.11.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
),
'endroid/qr-code' =>
array (
'pretty_version' => '3.9.6',
'version' => '3.9.6.0',
'aliases' =>
array (
),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
),
'ezimuel/guzzlestreams' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '3.0.x-dev',
),
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
),
'ezimuel/ringphp' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.1.x-dev',
),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
),
'guzzlehttp/guzzle' =>
array (
'pretty_version' => '6.3.0',
'version' => '6.3.0.0',
'aliases' =>
array (
),
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
),
'guzzlehttp/promises' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.4.x-dev',
),
'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa',
),
'guzzlehttp/psr7' =>
array (
'pretty_version' => '1.x-dev',
'version' => '1.9999999.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f',
),
'khanamiryan/qrcode-detector-decoder' =>
array (
'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2',
'aliases' =>
array (
),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
),
'mongodb/mongodb' =>
array (
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
'aliases' =>
array (
),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
),
'myclabs/php-enum' =>
array (
'pretty_version' => '1.7.7',
'version' => '1.7.7.0',
'aliases' =>
array (
),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
),
'perftools/php-profiler' =>
array (
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'aliases' =>
array (
),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
),
'psr/http-message' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.0.x-dev',
),
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
),
'psr/http-message-implementation' =>
array (
'provided' =>
array (
0 => '1.0',
),
),
'psr/log' =>
array (
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'aliases' =>
array (
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
),
'ralouphie/getallheaders' =>
array (
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
),
'react/promise' =>
array (
'pretty_version' => '2.x-dev',
'version' => '2.9999999.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '2.5.x-dev',
),
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
),
'symfony/options-resolver' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
),
'symfony/polyfill-intl-grapheme' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
),
'symfony/polyfill-intl-normalizer' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
),
'symfony/polyfill-php73' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
),
'symfony/property-access' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
),
'symfony/property-info' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '903f3f3f6a360bc4739f8390e5031acc70d9cd9f',
),
'symfony/string' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
),
'yidian/yaf_demo' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
),
),
); );
...@@ -10,7 +10,7 @@ CHANGELOG ...@@ -10,7 +10,7 @@ CHANGELOG
5.2.0 5.2.0
----- -----
* deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()`. in favor of `enable_magic_methods_extraction` * deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction`
5.1.0 5.1.0
----- -----
......
...@@ -552,8 +552,8 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp ...@@ -552,8 +552,8 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
$types = []; $types = [];
$nullable = $reflectionType->allowsNull(); $nullable = $reflectionType->allowsNull();
foreach ($reflectionType instanceof \ReflectionUnionType ? $reflectionType->getTypes() : [$reflectionType] as $type) { foreach (($reflectionType instanceof \ReflectionUnionType || $reflectionType instanceof \ReflectionIntersectionType) ? $reflectionType->getTypes() : [$reflectionType] as $type) {
$phpTypeOrClass = $reflectionType instanceof \ReflectionNamedType ? $reflectionType->getName() : (string) $type; $phpTypeOrClass = $type->getName();
if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) { if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) {
continue; continue;
} }
......
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