From 4efe2a43896dcc1e97f88d8c9f8b6d0a3ca5c5a1 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 25 Jul 2024 16:37:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E9=80=9A=E8=BF=87change?= =?UTF-8?q?log=E5=88=B7=E6=96=B0channel=E8=A1=A8=E5=92=8Cchannel=5Fauthori?= =?UTF-8?q?ty=E8=A1=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1208686570078208]通过changelog刷新channel表和channel_authority表数据 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1208686570078208 --- .../changelog/2024-07-26/neatlogic_tenant.sql | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/resources/neatlogic/resources/process/changelog/2024-07-26/neatlogic_tenant.sql b/src/main/resources/neatlogic/resources/process/changelog/2024-07-26/neatlogic_tenant.sql index bf85c238f..fa5804da9 100644 --- a/src/main/resources/neatlogic/resources/process/changelog/2024-07-26/neatlogic_tenant.sql +++ b/src/main/resources/neatlogic/resources/process/changelog/2024-07-26/neatlogic_tenant.sql @@ -1,5 +1,12 @@ -INSERT IGNORE INTO `channel_authority` (`channel_uuid`, `type`, `uuid`, `action`) SELECT `uuid`, 'common', 'alluser', 'view' FROM channel; +INSERT IGNORE INTO `channel_authority` (`channel_uuid`, `type`, `uuid`, `action`) +SELECT a.`uuid`, 'common', 'alluser', 'view' FROM channel a +LEFT JOIN `channel_authority` b ON b.`channel_uuid` = a.`uuid` +WHERE b.`channel_uuid` IS NULL; -INSERT IGNORE INTO `catalog_authority` (`catalog_uuid`, `type`, `uuid`, `action`) SELECT `uuid`, 'common', 'alluser', 'view' FROM catalog; +INSERT IGNORE INTO `catalog_authority` (`catalog_uuid`, `type`, `uuid`, `action`) +SELECT a.`uuid`, 'common', 'alluser', 'view' FROM catalog a +LEFT JOIN `catalog_authority` b ON b.`catalog_uuid` = a.`uuid` +WHERE b.`catalog_uuid` IS NULL; -UPDATE `channel` SET `is_active_priority` = 0, `is_display_priority` = 0 WHERE `uuid` NOT IN (SELECT DISTINCT `channel_uuid` FROM `channel_priority`); \ No newline at end of file +UPDATE `channel` SET `is_active_priority` = 0, `is_display_priority` = 0 +WHERE `uuid` NOT IN (SELECT DISTINCT `channel_uuid` FROM `channel_priority`); \ No newline at end of file -- Gitee