Commit Graph

91 Commits

Author SHA1 Message Date
zzh
41f4c58e99 Improve draft predeclare billing and structured create-fail payload.
Re-run forecast billing on draft pre-declare, and expose draftSaved/orderId/serviceNo via ErrorCode/Data/details for clearer place-order failure UX.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 19:30:27 +08:00
zzh
03f11a276f Add order attachment files table and move system labels off Order.
Persist generated/printed/downstream labels in t_order_file, drop Order.LabelUrl generate-status fields, and expose file list/upload/delete APIs with customer read-only systemLabel access.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 16:32:55 +08:00
zzh
e2443ed6f8 fix: restore country+weight price-check estimates for postcode zones.
When rules require postal codes, still quote by same-country snapshot zones as estimated; keep blocking countries not configured at all.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 11:14:12 +08:00
zzh
6f436f795f Fix downstream forecast success detection and persist provider service no.
Treat itfx body code/msg as business result, store full request/response, and write Data.serviceNo/trackNo back to the order.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 10:21:23 +08:00
zzh
fffecb5964 Fix downstream forecast: pass auth + cache itfx app secret
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 18:08:09 +08:00
zzh
28d14034bd fix: exclude domestic pickup products from price check
When destination country has no matching zone, stop using all price zones as fallback; also hide sales products in the domestic pickup group from price-check results and shipping options.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 16:00:58 +08:00
zzh
69d234c705 feat: simplify WeChat register and require contact before order
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 13:07:29 +08:00
zzh
71fbbf54c0 docs: add Chinese XML summaries for Channel/Order/RBAC Swagger APIs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:29:21 +08:00
zzh
60cb2c5e0f fix: document marketing APIs and hide Order batch helpers from Swagger
Add Chinese XML summaries for OMS-Marketing endpoints, and mark OrderService batch worker methods internal to stop OMS-Order swagger generation conflicts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 11:09:55 +08:00
zzh
89233bc3da feat: add customer marketing module (M1-M6 backend)
Implement referral, points, coupons, commission, member levels, and order integration with migration SQL and background jobs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 16:42:08 +08:00
zzh
8329bbc3a6 fix: unify publish snapshot API output and normalize legacy price content
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 12:03:47 +08:00
zzh
e2dca20966 fix: strip audit fields from channel price publish snapshots
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:55:21 +08:00
zzh
6314790598 feat: persist track upsert response in batch job item resultJson
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 09:28:34 +08:00
zzh
1545bc385f feat: ????????????? A0101/A0301/A0701
Fix UpsertSmallBag ApiCode/TrackNo assembly and MQ-disabled direct fallback; append lifecycle tracks on parcel create, inbound, and outbound. Redact channel fields for customer order list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 20:11:25 +08:00
zzh
3d5eaa223a feat: 小包全链路加固、待排货与运单号 IDE 前缀
查价/下单/入库/出库统一校验与计费上下文;待排货状态及可选入库排货;运单号改为 IDE+yyMMddHHmmss;补充迁移 SQL 与测试修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 19:00:55 +08:00
zzh
c2d854b83f fix: 批量任务详情查询不再写库,修复 ConcurrencyStamp 冲突
- MapJobOutputAsync 改为只读聚合,GET /jobs/{id} 不再 UpdateJob
- /jobs/{id}/items 仅校验存在,避免并行查询双写
- 重写 migrate_rename_warehouse_C_to_c.sql,支持 Navicat 与大小写两步改名

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 16:51:13 +08:00
zzh
a1daea6b35 refactor: 仓储表 C_* 改为 c_*,优化专线小包批量模板
- 仓储实体与 db.sql 统一为小写 c_ 前缀,新增 migrate_rename_warehouse_C_to_c.sql
- 专线小包批量模板精简版/标准版双模板,Excel 必填标红与发件地址上传参数

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 16:18:59 +08:00
zzh
d791f7b251 fix: 批量任务插入后回填 JobItemId,修复 MQ 消费后仍待处理
InsertItemsAsync 批量插入后按 MessageId 回填自增 Id;消费者支持 JobItemId=0 时按 JobId+MessageId 解析子项。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 15:12:41 +08:00
zzh
ab63920e85 chore: 触发 CI 重新构建发布,部署 OrderTask 合并后的上传接口
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 12:55:08 +08:00
zzh
bb09a51f4a refactor: 合并 OrderTask 至批量任务,移除 t_order_task 依赖
Excel 导入与任务进度统一走 t_order_batch_job;删除旧实体、仓储与 /order/task/* 接口,上传返回 jobId。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 12:36:57 +08:00
zzh
377cc525d6 feat: 增强批量任务子项反馈与客户单号持久化
统一成功/失败结果快照,补全客户单号与 Excel 行号;系统重试耗尽后标记失败避免子项长期停留在执行中;任务 API 返回 pending/running/cancelled 计数。
2026-07-22 12:00:53 +08:00
zzh
793085607a refactor: 字节枚举整型落库并统一发布快照 Status
发布记录 Status 改为 EsSnapshotStatus(TINYINT),计费启用判断改用 EnableStatus;db.sql 与 migrate_enum_int_comments.sql 补全枚举字段注释及旧库迁移。
2026-07-22 10:22:54 +08:00
zzh
dcf856568e fix: 批量任务系统失败重新抛异常以触发 EventBus 重试
Restore InvalidOperationException on system failures after EventBus refactor; use OrderTaskStatusCodes when syncing import tasks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 17:38:03 +08:00
zzh
365f9d8a94 fix: 数值枚举从 1 起编并统一 OrderTaskStatus 常量
Reserve 0 as None for byte enums and align customer group labels with dict codes; add OrderTaskStatusCodes for import task status strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 17:37:54 +08:00
32753e7606 简化 2026-07-21 10:45:57 +08:00
a4d6400318 refactor: 订单批量任务改走 Fake.EventBus.RabbitMQ
移除自建消费者与队列拓扑,统一由事件总线发布/消费,并优化下游转发查询与配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 17:54:29 +08:00
zzh
188aed1ee6 feat: 店铺订单创建物流/代发,并补齐收件人字段与种子数据
- 新增 batch-create-logistics / batch-create-fulfill:按平台行建物流单并回写 LinkedOrderId,代发支持绑定冻结与失败回滚
- ParcelBuilder 支持无 SKU 映射的平台行申报;批量创建可指定 OrderSource=platform
- 库存绑定候选接口支持 orderId=0 草稿选仓
- 店铺订单增加结构化收件人字段(db.sql + 迁移脚本),拉单回填;补充 customer9 店铺/揽收种子与 ConcurrencyStamp 修复脚本

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-19 22:33:55 +08:00
zzh
b679151eb1 feat: Hiprint模板转QuestPDF异步出面单,并接通打印链路
支持模板预览/字段字典、产品绑定 LabelTemplateId、订单 Pending→Ready 生成 PDF,以及 order/print、批量与仓内 printUrl。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 14:52:39 +08:00
zzh
f4ddd993b9 feat: 管理端列表返回客户名称/编码,并加固绑定与客户会话
订单/包裹/库存/店铺授权/店铺订单列表补充 customerName、customerCode;库存绑定按会话客户解析并兼容可用量;修复客户 mapId 识别与 ConcurrencyStamp 迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 11:10:53 +08:00
zzh
dc3071c90d feat: 物流单绑定包裹/库存(冻结可用库存)
支持我的订单对已创建物流单绑定仓储资源:新增 t_order_stock_bind 与 stock-bind API,库存/包裹增加 FrozenQty、AvailableQty。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 10:32:44 +08:00
zzh
fc823ed24e feat: 工作台统计补充店铺数量与待处理店铺订单,包裹单号前缀改为 ID
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:17:00 +08:00
zzh
a9338a4b25 feat: 揽收订单与列表支持管理端按客户筛选
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:41:20 +08:00
zzh
1cf55b2669 fix: 地址簿管理端可查全部,修复 SqlSugar 条件翻译
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 12:30:30 +08:00
zzh
9a48ec1a63 feat: 店铺订单拉单同步、RTS 与重新获取面单
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 11:38:06 +08:00
zzh
c2c03f63e3 feat: 店铺平台 OAuth 配置迁入其他配置页
运行时优先读 t_system_other_config,修正管理端客户提示文案,并提供配置种子 SQL。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 11:03:02 +08:00
zzh
674cbdd011 feat: 店铺真授权跳转与地址类型(发件/退件/收件)
对接 Lazada/Shopee/TikTok/Temu OAuth 与回调落库,移除手工店;地址管理支持按类型默认与揽收校验。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 10:25:13 +08:00
zzh
341a318f0b feat: 客户发件地址与揽收订单,复用小包创建全链路。
新增地址簿 CRUD、pickup/create、订单 orderSource 筛选;附带包裹商品图片上传接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 18:58:48 +08:00
zzh
d73c98b44e 修复列表分页丢Where:改用GetListAsync分页,状态筛选生效。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 13:45:08 +08:00
zzh
3d0db418d2 修复列表状态Tab将all误当状态筛选,并完善插件草稿TTL与客户上下文。
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 12:46:05 +08:00
zzh
c36bdb237c 重构客户编号生成规则,并修复店铺订单 summary SQL 翻译错误。
采用年码+月码+序号编码(5/6位,单月最多10000);summary 接口改用 hasStoreFilter 避免 SqlSugar 生成非法 SQL。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 17:54:29 +08:00
zzh
86a978b557 修复仓储与店铺订单列表 SqlSugar 可空筛选条件 SQL 翻译错误。
列表 predicate 改用 hasWarehouseFilter/hasStoreFilter 等本地变量,避免 ORM 生成非法 SQL。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 17:15:06 +08:00
zzh
c2d7b5c854 修复店铺列表 ExpirationFilter 嵌套三元导致 SqlSugar IIF 翻译失败。
按 expired/within7days/normal 分支构造独立 predicate,与充值等模块写法对齐。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 17:10:31 +08:00
zzh
fb61fbb072 修复仓储/店铺列表 ConcurrencyStamp 缺失与可空客户ID的 SQL 翻译错误。
补迁移脚本为 C_* 与 t_sales_* 表增加 ConcurrencyStamp;列表查询改用 hasCustomerFilter 模式避免 ORM 生成非法 SQL。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 16:48:05 +08:00
zzh
36fb191f94 修复管理端访问仓储与店铺接口时客户ID必填报错。
列表/汇总/详情改用 ResolveListCustomerIdAsync,管理端未传 customerId 时可查询全部数据。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 16:14:44 +08:00
zzh
8000162f02 docs: 仓储与店铺接口补充 Swagger 中文命名
为 WarehouseService、PlatformStoreService、PlatformStoreOrderService 全部新增接口添加 XML 注释,便于 Swagger 中文展示与前端对接。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 15:46:32 +08:00
zzh
a383ee6f32 feat: 实现仓储模块与平台店铺订单后端能力
新增仓储领域实体、仓储库、WarehouseService 全套接口及数据库迁移脚本;
实现店铺授权、店铺订单服务与库存匹配创建小包单;补充仓储模块 RBAC 权限种子数据。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 15:19:35 +08:00
zzh
5e26c5bcec fix: 微信注册保存失败提示与订单模板申报字段推导
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 09:52:44 +08:00
zzh
43563b727f feat: 自动触发公式引擎与查价运输方式分组接口
实现中文公式预报前拦截、规则测试 API 及按销售产品分组返回查价运输方式选项。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 18:36:17 +08:00
zzh
d8752959e7 feat(order): 强化小包下单规则并暴露预报失败原因
客户单号必填且同客户唯一,运单号统一 NE 前缀自动生成;模板导入不再接受跟踪号/运单号;列表与导出返回预报失败原因字段。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 09:44:12 +08:00
zzh
7d5bc2408f fix(order): 批量导入回写订单 ID 并增强 Excel 表头映射匹配
导入行成功后写入 batch job 的 orderId/serviceNo;预报失败时尽量关联草稿订单。Excel 读取与行映射支持表头归一化,兼容带括号说明的列名。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 18:34:59 +08:00