7 Commits

Author SHA1 Message Date
liufumingren
fd565fda7b feat(inbox): 规则引擎成为主回复路径,退回收件登记按仓库+货主聚合通知货主群 2026-08-27 23:41:43 +08:00
liufumingren
e6f4d9f341 feat(inbox): 处理备注推送货主群、群类型清空接口与群按ID管理
- afterSale.handleWorkOrder: 处理备注发送到对应货主售后群(notifyGroup,内部流程不推),响应 notified_groups
- inbox.group.reset: 新增清空群类型接口(入参群主键ID),权限迁移 556
- 群登记以 group_id 为准: 移除同名群回填,群ID不存在直接新建,store_id/群信息均按 group_id 精确匹配
- changeAddr: 已有工单也把客户原文转发快递群并升级 pending_feedback(仅 pending 可升级)
- handleExpressFeedback: 工单描述售后类型显示中文(订单.物流异常)
- 同步 methods/system.json 与 changes 记录
2026-08-17 22:01:18 +08:00
liufumingren
f3cf941721 feat: inbox 新增打包视频查询/查重/分配快递号函数,快递反馈回信优化 2026-08-14 23:06:05 +08:00
liufumingren
b436b6dd9e feat: 拦截链路全流程完善 — 新增interceptScan + 运单表同步 + 工单通知
新增:
- order.recheckOrder.interceptScan: 拦截扫描接口,入参运单号,查express标记退回,处理工单,更新订单拦截状态
- afterSale.createInterceptWorkOrdersAndNotify: 共享方法,幂等创建工单+通知快递群

修复:
- confirmIntercept: 补运单is_back同步(仅限is_intercept=Y),补工单创建+通知
- batchIntercept: 补运单is_intercept同步,补工单创建+通知
- batchUnintercept: 补运单is_intercept/is_back清除
- Qimen/OpenAPI cancel: 补运单is_intercept同步,补工单创建+通知
- interceptScan: 删除死查询,加空指针兜底

文档:
- methods/system.json: interceptScan + confirmIntercept 完整API文档
- methods/changes/system.json: 变更记录
2026-08-12 20:47:19 +08:00
liufumingren
35c71e13c4 feat(inbox): 群列表字段优化、where查询支持、快递接口加载及时间格式化
inbox.group.list 优化:
- 移除 warehouse_id 返回字段
- 新增 store_name(StoreWarehouse.store_remask)
- express_interfaces 改为 {id,name} 对象数组
- 新增 system_express_name(wms_express.name)
- created_at/updated_at 使用 app.formatDate 格式化
- 支持 pagination 对象 + where 结构化查询(parseWhereConditions)
- keyword 虚拟字段映射为 group_name LIKE
- groupType 驼峰映射为 group_type
- 增加 specialFieldMap 声明合法字段

新增 index.loadExpressInterfaces:
- 参考 loadStores 模式,拉取仓库下快递接口下拉列表
- 支持 systemExpressCode 入参过滤
- systemMethods/index.js 注册 + methods/system.json 文档

其他:
- delivery_order_code + store_id 联合索引迁移
2026-08-08 01:58:06 +08:00
liufumingren
948f600689 feat(inbox): 回调推送、出站文档、搜索增强、日志与推送状态完善
出站回调:
- 新增 warehouse_notify.json 文档(notify.ping/notify.reply),与 warehouse.json 互跳
- 回调体统一 { method, code, data },method 放 query,body 为业务数据
- MD5 签名: sign=MD5(appSecret+timestamp+bodyJson)
- 回调响应: {code:200} 成功,非200/非code:200 视为失败
- docs 页面支持模拟推送调试

搜索增强(searchStock/searchWarehouseStock):
- 直接查 stock_warehouse,不再依赖 stock_store
- 新增字段: gross_weight/box_spec/packing_requirements/prohibited_type
- 管理标识: is_sn_mgmt/is_shelf_life_mgmt/is_batch_mgmt
- 条码关联: wms_stock_barcodes
- 图片: wms_file_reference(business_type=stock)+wms_file,返回数组
- id 修正为 stock_warehouse.id

推送状态完善:
- handleApiMessage 增加 push_status 更新(2成功/3失败)
- 未配回调地址 → push_status=3 + error 原因
- 回调异常 catch 也更新 push_status=3 + 写日志
- 出站日志写入 wms_warehouse_log 表(WN-前缀)

消息列表:
- keyword 兼容 content/keyword,支持数组
- keyword 搜索 content/group_name/user_name 三列
- 支持 where+operator 结构化查询(parseWhereConditions)
- storeId=-1 查询无货主消息; storeId=0→IS NULL
- 日期范围: startDate/endDate

其他:
- silent 动作: AI 识别无需回复时跳过回执
- ai_enabled 灰度开关(群级)
- bindCode 文档修正
- store_name 改用 StoreWarehouse.store_remask
2026-08-08 00:17:38 +08:00
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