提交
This commit is contained in:
@@ -15701,6 +15701,71 @@ ALTER TABLE fl_inbound_outbox
|
||||
MODIFY COLUMN payload_hash VARCHAR(71) NULL COMMENT '事件规范化负载SHA-256;标准跨区事件含sha256:前缀';
|
||||
ALTER TABLE fl_inbound_outbox
|
||||
MODIFY COLUMN payload_json LONGTEXT NOT NULL COMMENT '事件负载快照;文本类型保留跨区事件摘要所依赖的数值词法';
|
||||
-- 2026-08-20 / 海外仓现有业务平台权限目录。
|
||||
USE baiyue_iam;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_lastleg_role_grant;
|
||||
CREATE TEMPORARY TABLE tmp_lastleg_role_grant (
|
||||
tenant_id BIGINT NOT NULL, role_id BIGINT NOT NULL, permission_code VARCHAR(128) NOT NULL,
|
||||
PRIMARY KEY (tenant_id, role_id, permission_code)
|
||||
);
|
||||
INSERT IGNORE INTO tmp_lastleg_role_grant (tenant_id, role_id, permission_code)
|
||||
SELECT role_permission.tenant_id, role_permission.role_id, permission.permission_code
|
||||
FROM iam_role_permission role_permission
|
||||
JOIN iam_permission permission ON permission.id=role_permission.permission_id
|
||||
WHERE permission.id BETWEEN 5106000 AND 5106004
|
||||
AND permission.permission_code IN ('platform:lastleg:order:list','platform:lastleg:order:transfer');
|
||||
DELETE role_permission FROM iam_role_permission role_permission
|
||||
JOIN iam_permission permission ON permission.id=role_permission.permission_id
|
||||
WHERE (permission.id BETWEEN 5106000 AND 5106004 AND permission.permission_code LIKE 'platform:lastleg:%')
|
||||
OR permission.permission_code IN ('platform:lastleg:order:detail','platform:lastleg:order:assign','platform:lastleg:order:merge-pallet');
|
||||
DELETE FROM iam_permission
|
||||
WHERE (id BETWEEN 5106000 AND 5106004 AND permission_code LIKE 'platform:lastleg:%')
|
||||
OR (tenant_id=0 AND app_code='PLATFORM' AND permission_code IN
|
||||
('platform:lastleg:order:detail','platform:lastleg:order:assign','platform:lastleg:order:merge-pallet'));
|
||||
INSERT INTO iam_permission
|
||||
(id,tenant_id,app_code,permission_type,parent_id,permission_code,permission_name,route_path,http_method,sort_no,status,built_in,deleted)
|
||||
VALUES
|
||||
(5107000,0,'PLATFORM','MENU',0,'platform:lastleg','海外仓业务','/lastleg',NULL,700,'ACTIVE',1,0),
|
||||
(5107010,0,'PLATFORM','MENU',5107000,'platform:lastleg:order:list','尾程订单','/lastleg/orders','GET',10,'ACTIVE',1,0),
|
||||
(5107011,0,'PLATFORM','BUTTON',5107010,'platform:lastleg:order:export','导出尾程订单',NULL,'GET',10,'ACTIVE',1,0),
|
||||
(5107012,0,'PLATFORM','BUTTON',5107010,'platform:lastleg:order:transfer','尾程订单转仓',NULL,'PUT',20,'ACTIVE',1,0),
|
||||
(5107020,0,'PLATFORM','MENU',5107000,'platform:lastleg:inbound-plan:list','入库单','/lastleg/inbound-plans','GET',20,'ACTIVE',1,0),
|
||||
(5107021,0,'PLATFORM','BUTTON',5107020,'platform:lastleg:inbound-plan:create','新建入库单',NULL,'POST',10,'ACTIVE',1,0),
|
||||
(5107022,0,'PLATFORM','BUTTON',5107020,'platform:lastleg:inbound-plan:edit','维护入库单',NULL,'POST',20,'ACTIVE',1,0),
|
||||
(5107023,0,'PLATFORM','BUTTON',5107020,'platform:lastleg:inbound-plan:appointment','FBA预约',NULL,'POST',30,'ACTIVE',1,0),
|
||||
(5107030,0,'PLATFORM','MENU',5107000,'platform:lastleg:relabel:list','换标单','/lastleg/relabels','GET',30,'ACTIVE',1,0),
|
||||
(5107031,0,'PLATFORM','BUTTON',5107030,'platform:lastleg:relabel:create','新增换标单',NULL,'POST',10,'ACTIVE',1,0),
|
||||
(5107032,0,'PLATFORM','BUTTON',5107030,'platform:lastleg:relabel:status','操作换标状态',NULL,'PUT',20,'ACTIVE',1,0),
|
||||
(5107040,0,'PLATFORM','MENU',5107000,'platform:lastleg:inventory:list','库存管理','/lastleg/inventory','GET',40,'ACTIVE',1,0),
|
||||
(5107041,0,'PLATFORM','BUTTON',5107040,'platform:lastleg:inventory:export','导出库存',NULL,'GET',10,'ACTIVE',1,0),
|
||||
(5107042,0,'PLATFORM','BUTTON',5107040,'platform:lastleg:inventory:manage','库存业务操作',NULL,'POST',20,'ACTIVE',1,0),
|
||||
(5107043,0,'PLATFORM','BUTTON',5107040,'platform:lastleg:inventory:adjust','库存盘点调整',NULL,'POST',30,'ACTIVE',1,0),
|
||||
(5107050,0,'PLATFORM','MENU',5107000,'platform:lastleg:dispatch:list','排车管理','/lastleg/dispatches','GET',50,'ACTIVE',1,0),
|
||||
(5107051,0,'PLATFORM','BUTTON',5107050,'platform:lastleg:dispatch:create','创建预排车单',NULL,'POST',10,'ACTIVE',1,0),
|
||||
(5107052,0,'PLATFORM','BUTTON',5107050,'platform:lastleg:dispatch:edit','编辑排车单',NULL,'PUT',20,'ACTIVE',1,0),
|
||||
(5107053,0,'PLATFORM','BUTTON',5107050,'platform:lastleg:dispatch:delete','取消排车单',NULL,'DELETE',30,'ACTIVE',1,0),
|
||||
(5107060,0,'PLATFORM','MENU',5107000,'platform:lastleg:overseas-procurement:list','海外采购','/lastleg/overseas-procurements','GET',60,'ACTIVE',1,0),
|
||||
(5107061,0,'PLATFORM','BUTTON',5107060,'platform:lastleg:overseas-procurement:edit','编辑海外采购单',NULL,'PATCH',10,'ACTIVE',1,0),
|
||||
(5107062,0,'PLATFORM','BUTTON',5107060,'platform:lastleg:overseas-procurement:review','审核海外采购单',NULL,'POST',20,'ACTIVE',1,0),
|
||||
(5107063,0,'PLATFORM','BUTTON',5107060,'platform:lastleg:overseas-procurement:outbound','登记采购出库',NULL,'POST',30,'ACTIVE',1,0),
|
||||
(5107070,0,'PLATFORM','MENU',5107000,'platform:lastleg:us-trucking:list','本土卡车','/lastleg/us-truck-orders','GET',70,'ACTIVE',1,0),
|
||||
(5107071,0,'PLATFORM','BUTTON',5107070,'platform:lastleg:us-trucking:status','操作卡车订单状态',NULL,'PATCH',10,'ACTIVE',1,0),
|
||||
(5107072,0,'PLATFORM','BUTTON',5107070,'platform:lastleg:us-trucking:receive','登记卡车收托',NULL,'POST',20,'ACTIVE',1,0)
|
||||
ON DUPLICATE KEY UPDATE permission_name=VALUES(permission_name),parent_id=VALUES(parent_id),permission_type=VALUES(permission_type),
|
||||
route_path=VALUES(route_path),http_method=VALUES(http_method),sort_no=VALUES(sort_no),status='ACTIVE',built_in=1,deleted=0;
|
||||
INSERT IGNORE INTO iam_role_permission (tenant_id,role_id,permission_id,created_at)
|
||||
SELECT saved.tenant_id,saved.role_id,permission.id,NOW(3)
|
||||
FROM tmp_lastleg_role_grant saved
|
||||
JOIN iam_permission permission ON permission.tenant_id=0 AND permission.app_code='PLATFORM'
|
||||
AND permission.permission_code=saved.permission_code;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_lastleg_role_grant;
|
||||
INSERT IGNORE INTO iam_role_permission (tenant_id,role_id,permission_id,created_at)
|
||||
SELECT 0,role.id,permission.id,NOW(3) FROM iam_role role
|
||||
JOIN iam_permission permission ON permission.tenant_id=0 AND permission.app_code='PLATFORM'
|
||||
WHERE role.tenant_id=0 AND role.app_code='PLATFORM' AND role.role_code='PLATFORM_ADMIN'
|
||||
AND role.status='ACTIVE' AND role.deleted=0
|
||||
AND (permission.permission_code='platform:lastleg' OR permission.permission_code LIKE 'platform:lastleg:%');
|
||||
|
||||
CALL baiyue_firstleg.assert_unified_final_schema();
|
||||
DROP PROCEDURE IF EXISTS baiyue_firstleg.assert_unified_final_schema;
|
||||
SELECT 'PASS' AS migration_status,
|
||||
|
||||
Reference in New Issue
Block a user