liufumingren
e61efbb66a
feat(inbox): 站内信模块完整实现 - AI智能助手、群管理、消息列表增强、灰度开关
...
新增功能:
- AI智能助手: DeepSeek多轮推理、函数调用(searchStock/createOrder等)
- silent动作: AI识别无需回复的消息(好的/谢谢/再见)自动跳过回执
- ai_enabled灰度开关: 群级别控制AI启停,支持逐群放量
- 消息列表增强: storeId/groupId/groupName/userName/content/sourceType多条件筛选,时间格式化
代码优化:
- processWithAI: 多轮推理循环(MAX_ROUNDS=5)、对话历史不含[#N]前缀防AI污染
- 回执记录补齐group_id/user_id/group_name/user_name上下文
- 移除未使用的target_channel字段及迁移
- bindCode文档修正: store_warehouse → store
接口文档:
- system.json v0.3.18→0.3.19: 新增aiEnabled参数、消息列表响应扩充
- changes/system.json: 新增bindCode变更记录
杂项:
- store_warehouse.js JSDoc补全
- wave.js waveBatchSource修复
2026-08-06 17:40:36 +08:00
liufumingren
b00e320262
fix(db): expand item_snapshot_key to VARCHAR(1024) to prevent Data too long error
...
- wave_batch.item_snapshot_key: 255 -> 1024, full index -> prefix index(191)
- inbox-menu-permissions: INSERT -> INSERT IGNORE for idempotent production rerun
2026-08-05 22:46:22 +08:00
liufumingren
0b781a7e70
feat: 店铺快递绑定策略模块 + 订单创建链路集成 + 运单号分配优化
...
【新增模块】
- app/model/store_express_binding_policy.js: 策略数据模型(17字段,JSON数组)
- app/service/systems/store_express_binding_policy.js: CRUD+列表(含名称批量解析)
- app/service/systems/express_policy.js: 缓存优先策略查询 + 6维漏斗匹配引擎
- app/service/systemMethods/store_express_binding_policy.js: method路由层
- database/designs/store-express-binding-policy-design.md: 设计文档
【策略漏斗匹配逻辑】
- 按priority DESC逐条匹配: store_ids→shop_name→prohibited→regions→exclude→weight
- NULL/空数组=不限, 未命中自动continue到下一条
- 地区/店铺匹配使用子串包含(省/市/区/详细地址均生效)
- 违禁品匹配使用数组交集
- 输出快递编码+重量类型, 未命中返回null
【订单创建链路集成】
- addOrder→addOrderLines后触发matchPolicy(weight可用)
- 命中: 写入logistics/sys_logistics 4字段+weight_type+操作日志
- 未命中: 降级到resolveExpressSnapshot默认值+兜底DEFAULT_STORE_SUBJECT_CONFIG(STO)
- 系统快递4字段一致, 自定义映射(express_setting)分流写入
【运单号分配优化】
- pickWaybillExpressInterface两步兜底:
Step1: logistics_code仅匹配express_code(自定义编码精确)
Step2: sys_logistics_code匹配全候选码(系统编码兜底)
- 新增weight_type过滤器(接口NULL=通配, 设限须精确匹配)
- groupedOrder.options新增sys_logistics_code/weight_type传递
【操作码翻译】
- ORDER_EXPRESS_POLICY_MATCH: '策略命中'
- ORDER_EXPRESS_FALLBACK: '快递降级'
- 无策略命中时写入快递降级日志
【API文档】
- methods/system.json: 策略模块4接口+响应字段(express_name/数组类型等)
【数据库迁移】
- 13个migration: 建表→字段迭代→TEXT改JSON→prohibited改数组(dev+prod均执行)
2026-08-04 08:18:43 +08:00
liufumingren
7a1f15ac6a
fix(inbox): 移除 warehouseMethods 中 targetUrl/refCode 残留
2026-08-03 03:59:56 +08:00
liufumingren
440ace1a5d
refactor(inbox): 移除 target_url(改用ApiApp回调地址)和 ref_code(合并到ext_data)
2026-08-03 03:17:59 +08:00
liufumingren
4374ad01e3
feat(inbox): 站内信模块完整实现 — 统一消息收件箱
2026-08-03 01:36:16 +08:00
liufumingren
45b59ea35c
feat(camera): 新增摄像头 OSD 叠加功能
...
- 新增 camera model username/password 字段
- 新增 osd_client.js OSD 客户端库
- 工作台打包时自动叠加 OSD 信息到摄像头(带 Redis 缓存去重)
- 新增迁移脚本:摄像头用户名密码字段
2026-08-01 03:44:02 +08:00
liufumingren
edc164298d
feat(waybill): 新增面单/运单管理模块
...
- 新增 systems/waybill.js 业务层:运单列表查询/详情/导出
- 新增 systemMethods/waybill/warehouse.js 入口层
- 新增 6 个迁移脚本:面单列表索引、store_id 列、物流编码/名称回填、发货单号列、货主ID回填、发货字段回填
- 更新 waybill-module-design.md 设计文档
2026-08-01 03:43:47 +08:00
liufumingren
76e25db7da
feat(apiApp): 新增仓库 API 应用管理模块
...
- 新增 systems/apiApp.js 业务层:CRUD + AppKey/Secret 自动生成 + 仓库隔离
- 新增 systemMethods/apiApp.js 入口层:list/detail/create/update/delete/regenerateSecret
- 注册 methods/system.json API 文档 + changes 变更记录
- 新增迁移脚本:wms_permission 固定 ID 464-470 + 客服组主管及以上角色授权
2026-08-01 03:39:41 +08:00
liufumingren
635e86f984
chore: 提交当前所有变更,准备开始 allocateSubOrderNumber step=4 改造
2026-07-29 13:57:04 +08:00
liufumingren
81350c0d6b
fix: 定时任务同步日志 + 基础设施修复 + 权限迁移(收尾)
...
【定时任务】sync_outbound_orders_to_delivery: 执行日志写缓存 + 错误详情提取(parent/validation)
【基础设施】system.js: snake_case→camelCase 服务路由转换(兼容 express_interface 等)
【看板】dashboard: queryWarehouseStats 支持 storeId 货主维度过滤
【订单基类】order/base: getOrderModel 兼容无上下文时传入 warehouseId(货主侧场景)
【库存】inventory: 全量移库软删除→硬删除(force destroy)释放唯一键 + 唯一约束/校验错误友好提示
【快递平台】express_platform: KS(快手)平台 receiver.phone 不传(平台要求)
【迁移】delivery 自增起点 + supervisor CS 权限修复
2026-07-27 03:49:27 +08:00
liufumingren
3c53b3c8fa
feat(storage): 入库/收货模块货主侧功能 (listStore, export)
...
- entry: 新增 listStore(货主维度列表)、export/exportTaskProgress(异步导出)
- entry: 新增 storeExport/storeExportTaskProgress(货主侧导出)
- receiving: 新增 getStoreReceivingList(货主维度收货单查询)
- receiving: 新增 export 异步导出 + fix 时间字段 created_at→updated_at
- 迁移: receiving_detail creator_id 去 zerofill + 货主收货权限
2026-07-27 03:47:49 +08:00
liufumingren
972c912e53
feat(express): 快递接口支持启用/停用,过滤取消状态订单
...
- express_interface 新增 is_enabled 字段(1=启用, 0=停用)
- expressInterface service 支持 is_enabled 筛选与编辑
- express 运单分配跳过停用接口 + 取消状态订单过滤
- 迁移: 20260724100000-add-is-enabled-to-wms-express-interface
2026-07-27 03:47:27 +08:00
liufumingren
f40370baca
feat(print): 打印电脑管理增强(录制、软删除、独立接口)
...
- print_computer: 新增录制字段(is_recording/recording_size/remote_play_url/recording_directory/deleted_at)
- print_stations: 新增 deleted_at 软删除
- 新增 printComputer service (systemMethods + systems)
- order_print 重构: 商品信息从 picking 表直读,不再依赖 order_items
- 8 条迁移: 录制→软删除→权限→目录
2026-07-27 03:47:09 +08:00
liufumingren
b485f8e9f1
feat(camera): 新增摄像头/录制模块 (camera/camera_server/pack_task_video)
...
- 新增 model: camera, camera_server
- 新增 services: camera, cameraServer (systemMethods + systems)
- 新增 pack_task_video 表及录制状态管理
- 7 条迁移: 建表→设备字段→端口拆分→状态枚举
2026-07-27 03:46:51 +08:00
liufumingren
5b3180ff34
feat(workbench): 新增工作台/打包台模块 (workbench/pack_task)
...
- 新增 model: workbench, pack_task, pack_task_packer
- 新增 systemMethods: workbench (finishPack/sendWeight/操作日志)
- systems/workbench 扩展: 波次订单ID获取、打包操作日志白名单
- 10 条迁移: 建表→扩展→权限→重构
2026-07-27 03:46:37 +08:00
liufumingren
19c3fe09a7
refactor(weight): 重量字段统一为 INTEGER(g),取代 DECIMAL(kg)
...
- 8 个 model 重量字段类型 DECIMAL→INTEGER,注释 kg→g
- order_express 称重校验改为正整数(g)
- delivery_order 手动单查 StockStore + warehouse 称重毛重
- openapi.json 毛重/净重描述 kg→g
- 迁移: 20260725120000-unify-weight-fields-to-int-g
- 脚本: update-stock-warehouse-weight.cjs
2026-07-27 03:46:07 +08:00
liufumingren
7ff7285222
feat(stock.transaction): 新增 UNLOCK 类型,取消锁定时写入 UNLOCK 而非 OUTBOUND
...
- stock_transaction 枚举新增 UNLOCK(取消锁定)
- stock_store 取消锁定时写 UNLOCK 流水
- 迁移: 20260711160000-add-unlock-to-wms-stock-transaction
2026-07-27 03:45:54 +08:00
liufumingren
fddd142427
fix: custom_barcode 唯一约束改为仓库级别,修复 batchUpdateSpaceInfo 等条码检查跨仓库问题
2026-07-10 18:10:11 +08:00
liufumingren
14a5f13ad5
feat(db): wms_store_warehouse 新增 initiator_subject_id,wms_picking 新增 stock_id 及联合索引
...
- wms_store_warehouse: 新增 initiator_subject_id 记录发起方主体ID
- wms_picking: 新增 stock_id 字段 + idx_wms_picking_warehouse_stock 联合索引 + 历史数据回填
- Model 层同步更新关联定义
2026-07-09 03:36:03 +08:00
liufumingren
76c52fa268
use_status 重命名为 warehouse_use_status,新增 store_use_status;仓库/货主侧独立控制签约使用状态,unbind 按身份分派字段
2026-07-06 22:12:23 +08:00
liufumingren
df1bd38601
商品流水增加锁定类目语义类型
2026-07-06 19:28:45 +08:00
liufumingren
7854057244
chore: ESLint auto-fix formatting (JSDoc, spacing, quotes, line endings)
2026-07-04 23:30:32 +08:00
liufumingren
478ad2ab0d
1
2026-07-03 16:10:46 +08:00
liufumingren
34273c166b
1
2026-07-02 22:08:47 +08:00
liufumingren
5ef99e3bed
1
2026-07-01 14:00:59 +08:00
liufumingren
77435aeb79
1
2026-06-23 18:48:33 +08:00
liufumingren
d743e67b9d
1
2026-06-17 01:18:55 +08:00
liufumingren
025184904a
1
2026-06-14 19:03:58 +08:00
liufumingren
43c60dd934
1
2026-06-09 14:12:02 +08:00
liufumingren
c2b5ffc319
1
2026-06-07 20:42:24 +08:00
liufumingren
eb100b056d
1
2026-06-07 01:52:06 +08:00
liufumingren
99367e5043
1
2026-06-06 05:15:46 +08:00
liufumingren
4beefcd22c
feat(print,docs,migrations): add notifyLock, order export, express fields and related docs
...
notifyLock method + logs
print.send logs
order export methods + docs
express model fields SPH/XHS/DW/JD + migration
platform_shop_id migration
notifyLock docs
order export docs
2026-05-30 17:30:17 +08:00
liufumingren
abf2c4d94a
1
2026-05-29 16:47:38 +08:00
liufumingren
dc4894cb6d
1
2026-05-25 17:08:56 +08:00
liufumingren
150e2977d4
修改快递接口配置,拼多多取号,未完成
2026-05-22 08:39:07 +08:00
liufumingren
8cf2c5befa
1
2026-05-20 16:31:29 +08:00
liufumingren
e23bf4f15e
1
2026-05-17 03:23:57 +08:00
liufumingren
adb1a16599
1
2026-05-16 23:00:49 +08:00
liufumingren
9845a239e2
1
2026-05-16 02:44:53 +08:00
liufumingren
736ad34351
打印台管理变更
2026-05-14 15:57:51 +08:00
liufumingren
81785081a2
团购打印面单
2026-05-13 17:23:24 +08:00
liufumingren
0c3518e65d
1
2026-05-13 03:18:39 +08:00
liufumingren
9c2b254206
1
...
Co-authored-by: Copilot <copilot@github.com>
2026-05-11 08:44:27 +08:00
liufumingren
d711ba9c21
0506更新
...
Co-authored-by: Copilot <copilot@github.com>
2026-05-06 17:53:54 +08:00
liufumingren
9b2cc5fc73
fix(receiving): 修复获取收货单时重复定义属性的问题
2026-05-06 01:32:55 +08:00
liufumingren
5ce689d771
1
...
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 19:20:31 +08:00
liufumingren
b7f980188f
1
...
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 17:43:54 +08:00
liufumingren
0ffe290a21
chore: commit all current workspace changes
2026-04-27 16:09:26 +08:00