新增: - 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: 变更记录
43 lines
1.7 KiB
JavaScript
43 lines
1.7 KiB
JavaScript
'use strict';
|
||
|
||
/**
|
||
* 新增售后模块页面权限(售后工单 + 工单列表)。
|
||
*
|
||
* 新增:
|
||
* Web Pages:
|
||
* 524 — afterSale.workOrder 售后工单(根菜单)
|
||
* 525 — afterSale.workOrder.list 工单列表(子页面,parent_id=524)
|
||
*
|
||
* 幂等设计:使用 INSERT IGNORE,已存在的 id 不会重复插入。
|
||
*/
|
||
|
||
const TABLE = 'wms_permission';
|
||
const COLUMNS = 'id, path, component, name, redirect, meta_title, meta_icon, hidden, always_show, parent_id, type, sort, status, created_at, update_at';
|
||
|
||
module.exports = {
|
||
// eslint-disable-next-line no-unused-vars
|
||
async up(queryInterface, Sequelize) {
|
||
const pages = [
|
||
[524, 'afterSale.workOrder', null, 'afterSale.workOrder', null, '售后工单', null, 0, 0, null, 'web_pages', 15, 1],
|
||
[525, 'afterSale.workOrder.list', null, 'afterSale.workOrder.list', null, '工单列表', null, 0, 0, 524, 'web_pages', 0, 1],
|
||
];
|
||
|
||
for (const [id, path, component, name, redirect, meta_title, meta_icon, hidden, always_show, parent_id, type, sort, status] of pages) {
|
||
await queryInterface.sequelize.query(
|
||
`INSERT IGNORE INTO \`${TABLE}\` (${COLUMNS}) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW())`,
|
||
{ replacements: [id, path, component, name, redirect, meta_title, meta_icon, hidden, always_show, parent_id, type, sort, status] }
|
||
);
|
||
}
|
||
},
|
||
|
||
// eslint-disable-next-line no-unused-vars
|
||
async down(queryInterface, Sequelize) {
|
||
const ids = [524, 525];
|
||
const placeholders = ids.map(() => '?').join(', ');
|
||
await queryInterface.sequelize.query(
|
||
`DELETE FROM \`${TABLE}\` WHERE id IN (${placeholders})`,
|
||
{ replacements: ids }
|
||
);
|
||
},
|
||
};
|