liufumingren c35ac184ae feat: WMS 开放接口签名 & 消息转发模块
- 新增 extra/wms.php 统一配置(app_key/app_secret/base_url)
- 新增 WmsSign.php 签名工具(canonicalQuery + bodySign + stableStringify)
- 新增 WmsVerify.php 验签工具(恒定时间比较防时序攻击)
- 新增 func/ 目录与远端 API 对应(Index.ping / Store.list / Inbox.push)
- 重构 Forward.php 使用 Inbox.push 转发群聊消息到 WMS 站内信
- Chat.php processMessage 接入 Forward 转发,异常不阻塞原有流程
- 删除冗余 WmsSignConfig.php,配置统一从 config('wms') 读取
- 修复 deploy.js chown/chmod .user.ini 报错
2026-08-06 22:46:30 +08:00

48 lines
1.2 KiB
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\func;
/**
* 货主模块 — store
*
* 查询当前仓库下已授权的货主列表。
* 筛选条件:auth_status=2(已通过)+ store.status=1(启用)+ warehouse_use_status=1(可用)
*
* 使用示例:
* $store = new Store();
* $result = $store->list(['page' => 1, 'pageSize' => 20]);
*/
class Store extends Base
{
/**
* {@inheritDoc}
*/
protected function moduleName()
{
return 'store';
}
// ==================== API 方法 ====================
/**
* store.list — 查询已授权货主列表
*
* 返回货主基本信息与授权状态(需 auth_status=2 已通过 +
* store.status=1 启用 + warehouse_use_status=1 可用)。
*
* @param array $params 查询参数
* - page int 页码(可选,默认 1)
* - pageSize int 每页条数(可选,默认 20)
* @return array ['code' => int, 'msg' => string, 'data' => array]
*/
public function list(array $params = [])
{
$body = array_merge([
'page' => 1,
'pageSize' => 20,
], $params);
return $this->call('list', $body);
}
}