- express/Recognizer:按字母前缀 + 位数号段识别运单快递公司(p01~p35)
- express/Trace:批量并发查轨迹(curl_multi,默认 10 并发),解析状态/首末轨迹/中转签收时效
- notify/WaybillReceiveHandler:外部传入运单号自动识别公司后查轨迹,轨迹非空即已揽收,
已揽收结果缓存 24h(命中不再请求接口),未揽收/查不到/识别不出/接口异常一律返回 0
- notify/RawResponse:支持裸数组响应透出,不套 {code,msg,data} 外壳
- new_wms_notify 输出 [{"waybill_code","is_galaxy_receive"}]
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
32 lines
764 B
PHP
32 lines
764 B
PHP
<?php
|
||
|
||
namespace app\index\library\new_wms\notify;
|
||
|
||
/**
|
||
* 原样响应
|
||
*
|
||
* 入站处理器默认返回 ['code' => int, 'msg' => string, 'data' => mixed] 外壳,
|
||
* 由 new_wms_notify 统一 json 输出。
|
||
*
|
||
* 个别方法(如 waybill.getreceive)外部约定直接返回裸数组,不允许套壳,
|
||
* 此时处理器返回本对象,Dispatcher 原样透出,控制器按 $data 输出。
|
||
*/
|
||
class RawResponse
|
||
{
|
||
/** @var mixed 直接作为响应体的数据 */
|
||
public $data;
|
||
|
||
/** @var int HTTP 状态码 */
|
||
public $httpCode;
|
||
|
||
/**
|
||
* @param mixed $data
|
||
* @param int $httpCode
|
||
*/
|
||
public function __construct($data, $httpCode = 200)
|
||
{
|
||
$this->data = $data;
|
||
$this->httpCode = $httpCode;
|
||
}
|
||
}
|