WMS_MAIN/database/migrations/20260808100000-add-delivery-code-store-index.js
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

15 lines
458 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
// Query 3 关联查询:delivery_order_code + store_id 联合索引(最高频缺失索引)
await queryInterface.addIndex('wms_order_express', ['delivery_order_code', 'store_id'], {
name: 'idx_delivery_code_store',
});
},
async down(queryInterface, Sequelize) {
await queryInterface.removeIndex('wms_order_express', 'idx_delivery_code_store');
},
};