新增功能: - 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修复
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
'use strict';
|
||
|
||
/**
|
||
* 为 wms_inbox_group 添加快递相关字段:
|
||
* - express_interfaces:快递接口ID列表(逗号分隔)
|
||
* - system_express_code:系统快递编码
|
||
*/
|
||
module.exports = {
|
||
up: async (queryInterface, Sequelize) => {
|
||
const { STRING } = Sequelize;
|
||
|
||
// 检查列是否已存在
|
||
const tableInfo = await queryInterface.describeTable('wms_inbox_group');
|
||
|
||
if (!tableInfo.express_interfaces) {
|
||
await queryInterface.addColumn('wms_inbox_group', 'express_interfaces', {
|
||
type: STRING(500),
|
||
allowNull: true,
|
||
comment: '快递接口ID列表,逗号分隔(仅群类型为 express 时生效)',
|
||
});
|
||
}
|
||
|
||
if (!tableInfo.system_express_code) {
|
||
await queryInterface.addColumn('wms_inbox_group', 'system_express_code', {
|
||
type: STRING(50),
|
||
allowNull: true,
|
||
comment: '系统快递编码(仅群类型为 express 时必填)',
|
||
});
|
||
}
|
||
},
|
||
|
||
down: async (queryInterface) => {
|
||
const tableInfo = await queryInterface.describeTable('wms_inbox_group');
|
||
|
||
if (tableInfo.express_interfaces) {
|
||
await queryInterface.removeColumn('wms_inbox_group', 'express_interfaces');
|
||
}
|
||
if (tableInfo.system_express_code) {
|
||
await queryInterface.removeColumn('wms_inbox_group', 'system_express_code');
|
||
}
|
||
},
|
||
};
|