chenchuchuan
|
86843c4b5a
|
docs(readme): 包结构改为按当前代码目录展开
- 「一、包职责」改为「一、包结构」,按 shared / channel / http / lingxing
实际包与类逐目录列出,lingxing 下展开到子平台(含各自 dto/product/order/shop)
- testkit 归到 shared.testkit 下展示,与实际包名一致
- GUIDE / 操作手册 中指向 README 的说法同步
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 weeks ago |
chenchuchuan
|
e1d6621d3d
|
docs: GUIDE / 操作手册 对齐 shared/channel 与领星现状
GUIDE:
- 能力接口清单补齐结算/售后/出库/面单/审核/订单编辑,门面 API 补全视图
- 接入示例改为「适配器不持凭据」,端点与密钥取自 ChannelContext
- 测试分层改为 单测 → 契约(RecordingTransport+夹具)→ 真实冒烟(系统属性传凭据)→ 分页水位线 → 门面能力
- 验收与实现状态表按 channel/shared 模块名更新
操作手册:
- 商品搜索维度 searchField / searchValue / searchValues,及 Target LOCAL_SKU 的显式拒绝
- 商品 / 店铺 / 订单详情的支持范围按实际子平台修正
- platform_code 对照与实现状态表按实测补齐
代码:ChannelAccount 的 credentialRef 注释去掉已废弃的 SecretProvider 说法
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 weeks ago |
chenchuchuan
|
6a8796cc0b
|
fix: 补齐包更名遗留的 package 声明与 GUIDE 示例
- IdempotencyGuardTest 的 package 由 common.ecommerce.idempotency
改为 common.ecommerce.shared.idempotency,与文件路径一致
- GUIDE 示例里的 import 与子包说明同步到 channel / shared
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 weeks ago |
chenchuchuan
|
8bca2bff73
|
refactor: 模块更名 shared/channel,README 补架构图
- common → shared(跨域共享层),core → channel(渠道域),
包名同步为 common.ecommerce.shared.* / common.ecommerce.channel.*
- GUIDE / 操作手册 的 Maven 坐标随之更新
- README 增加架构图:分层依赖、模块依赖、一次查询的调用链;
包职责表与 lingxing 适配器结构对齐当前实现
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 weeks ago |
chenchuchuan
|
aaeb0c23f5
|
refactor: 拆出 common 模块,渠道域与仓库域共享基础设施
把与渠道域无关的基础设施从 core 上提到 common 模块(包名
common.ecommerce.shared.*),为三方仓域复用同一套 SPI 与管道做准备。
不改变任何行为,只做搬迁、改包名与 import。
迁移内容(36 个类 + 3 个测试):
- audit CallObserver / CallOutcome / CallRecord / Slf4jCallObserver
- error 8 个异常(AuthException … ValidationException)
- idempotency IdempotencyGuard / WriteAudit / WriteResult / WriteScope
- spi AccessToken / ChannelSecret / TokenStore / LockProvider /
SecretProvider / SyncCursorStore / Idempotency* 共 10 个
- sync SyncSpec / SyncResult(SyncEngine 留在 core,它依赖订单模型)
- model Platform / ChannelProvider / Capability / FulfillmentMode
- support Money / Page / PlatformTime / CanonicalKeys
模块依赖调整为:
core / http / testkit → common
lingxing → core + http + common
http 不再依赖 core,仓库域可直接复用传输层与令牌管理。
验证:全量 84 个测试通过(common 33 / core 29 / http 13 / testkit 29 /
lingxing 84 含 13 个默认跳过的探针)。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2 weeks ago |
chenchuchuan
|
20d6bbe975
|
refactor(lingxing): 搭子平台分派骨架,删除全部假数据
结构:
- 新增 LingxingApi 枚举:路径 + 限流,一条路径只写一次
- 新增 platform/ 包:LingxingSubPlatform 接口、LingxingSubPlatforms 注册表、
LingxingCall 调用上下文、walmart/WalmartSubPlatform 首个实现
- LingxingAdapter.pull 改为按 Platform 分派,supports 委托子平台
删除假数据:
- LingxingApi 里凭空猜测的 SHOP_LIST_* / PRODUCT_LIST_* 路径
- LingxingAdapter.listSubChannels 由账户拼出的假子渠道,改为显式抛异常
- LingxingConstants 中与 LingxingApi 重复的路径与限流常量
- README / GUIDE 中已删除的 FakeTransport、Fixtures 相关内容
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
54877562d1
|
refactor(sdk): 连接信息改由调用方每次传入,SDK 不保存
端点与凭据此前固化成常量或注入的 SecretProvider,等于 SDK 在替宿主保存连接配置。
现在改为调用方每次调用显式传入:
- 新增 ChannelConnection(endpointBaseUrl + ChannelSecret)
- ChannelContext 持有 connection;新增 endpointBaseUrl() / secret()
- ChannelSdk.salesOrders(key, conn) / products(key, conn) 必须传连接
- LingxingAdapter 构造函数不再接收 baseUrl 与 SecretProvider
- LingxingRequestFactory 的 baseUrl 改为每次 post 传入
- LingxingTokenClient.fetch(baseUrl, appId, appSecret)
- ChannelSecret 增加 endpointBaseUrl:TokenManager 的 refresh 回调只拿得到凭据对象
- LingxingConstants.DEFAULT_BASE_URL 改名 PRODUCTION_BASE_URL,明确仅作参考/测试常量
TokenManager 仍按设计文档 9.1 管理 token 生命周期(缓存、提前续期、防击穿、
失效重取),token 存储仍走宿主 TokenStore SPI——文档没要求 SDK 自己存。
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
5bd69e7f1c
|
docs(guide): 补充端点写成常量、SDK 不碰存储不读配置两条约定
|
3 weeks ago |
chenchuchuan
|
8560c2ea47
|
build(lingxing): DTO 使用 Lombok 生成访问器
两个领星 DTO 是纯数据容器,访问器占 47 行样板代码。改用 @Getter/@Setter 后:
- LingxingOrderDto 196 → 82 行
- LingxingOrderItemDto 88 → 40 行
范围限定在 lingxing/dto:core 的领域模型是不可变 + Builder,不使用 Lombok。
依赖 scope=provided,不进宿主运行时。
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
b694116aa6
|
build: Maven groupId 改为 ecommerce
Java 包名去掉 apelet 前缀后,Maven 坐标同步对齐。
- 根 pom 与四个子模块的 groupId、parent、依赖坐标
- GUIDE 第三章示例中的 groupId
- README 移除「groupId 待处理」事项
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
b305fd9608
|
docs: 新增开发指南与领星真实环境冒烟测试
- GUIDE.md:心智模型、基接口逐个讲、三条流水线、接入新平台 8 步、5 层测试、验收清单
- LingxingLiveSmokeTest:未配置环境变量时整类跳过,先验认证再验报文,打印脱敏请求响应
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |