liufumingren 4e5c05dfc3 feat(wms): 新增运单揽收状态查询回调 waybill.getreceive
- 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>
2026-11-11 03:22:21 +08:00

32 lines
764 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
}
}