From 867fe270d153e02a4f35862242129aaf616d3183 Mon Sep 17 00:00:00 2001 From: luofu Date: Mon, 24 Mar 2025 13:50:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(hotfix/20250324):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B8=85=E6=B4=97=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tyr/server/TyrServerTestApplication.java | 1 + .../server/controller/PrivateController.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java b/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java index 30bc2957..c5262a0d 100644 --- a/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java +++ b/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java @@ -22,6 +22,7 @@ import org.springframework.scheduling.annotation.EnableAsync; public class TyrServerTestApplication { public static void main(String[] args) throws Exception { +// System.setProperty("rocket.consumer.listeners.disable", "true"); System.setProperty("spring.profiles.active", "test"); System.setProperty("NACOS_HOST", "https://test-nacos.axzo.cn"); System.setProperty("NACOS_NAMESPACE_ID","f3c0f0d2-bac4-4498-bee7-9c3636b3afdf"); diff --git a/tyr-server/src/main/java/cn/axzo/tyr/server/controller/PrivateController.java b/tyr-server/src/main/java/cn/axzo/tyr/server/controller/PrivateController.java index 2f2fa2e1..a1abbc09 100644 --- a/tyr-server/src/main/java/cn/axzo/tyr/server/controller/PrivateController.java +++ b/tyr-server/src/main/java/cn/axzo/tyr/server/controller/PrivateController.java @@ -46,6 +46,7 @@ import cn.axzo.tyr.server.repository.dao.SaasPgroupRoleRelationDao; import cn.axzo.tyr.server.repository.dao.SaasRoleDao; import cn.axzo.tyr.server.repository.dao.SaasRoleGroupDao; import cn.axzo.tyr.server.repository.dao.SaasRoleGroupRelationDao; +import cn.axzo.tyr.server.repository.dao.SaasRoleUserRelationDao; import cn.axzo.tyr.server.repository.entity.SaasFeature; import cn.axzo.tyr.server.repository.entity.SaasFeatureResource; import cn.axzo.tyr.server.repository.entity.SaasPageElement; @@ -71,8 +72,10 @@ import cn.axzo.tyr.server.service.WorkspaceProductService; import cn.axzo.tyr.server.service.impl.SaasFeatureResourceCacheService; import cn.axzo.tyr.server.util.FeatureCodeUtil; import cn.azxo.framework.common.utils.StringUtils; +import cn.hutool.core.collection.CollUtil; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import lombok.AllArgsConstructor; @@ -143,6 +146,7 @@ public class PrivateController { private final RoleSaasFeatureResourceCacheService roleSaasFeatureResourceCacheService; private final SendDingTalkHandler sendDingTalkHandler; private final ProductSaasFeatureResourceCacheService productSaasFeatureResourceCacheService; + private final SaasRoleUserRelationDao saasRoleUserRelationDao; /** * 统一层级的roleGroup按照id升序,sort从1递增 @@ -1355,6 +1359,21 @@ public class PrivateController { return "ok"; } + /** + * 清洗saas_role_user_relation数据 + */ + @PostMapping("/api/private/role/user/relation/delete") + public Object deleteSaasRoleUserRelation(@RequestBody JSONObject param) { + List ids = param.getJSONArray("ids").stream() + .map(s -> Long.valueOf(s.toString())) + .distinct() + .collect(Collectors.toList()); + if (CollUtil.isNotEmpty(ids)) { + saasRoleUserRelationDao.deleteById(ids); + } + return "ok"; + } + @Data @Builder @NoArgsConstructor From 7514d712bb38a75a868133813d7e8c41005be600 Mon Sep 17 00:00:00 2001 From: luofu Date: Mon, 24 Mar 2025 13:56:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(hotfix/20250324):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B8=85=E6=B4=97=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/axzo/tyr/server/TyrServerTestApplication.java | 1 - 1 file changed, 1 deletion(-) diff --git a/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java b/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java index c5262a0d..30bc2957 100644 --- a/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java +++ b/tyr-server/src/main/java/cn/axzo/tyr/server/TyrServerTestApplication.java @@ -22,7 +22,6 @@ import org.springframework.scheduling.annotation.EnableAsync; public class TyrServerTestApplication { public static void main(String[] args) throws Exception { -// System.setProperty("rocket.consumer.listeners.disable", "true"); System.setProperty("spring.profiles.active", "test"); System.setProperty("NACOS_HOST", "https://test-nacos.axzo.cn"); System.setProperty("NACOS_NAMESPACE_ID","f3c0f0d2-bac4-4498-bee7-9c3636b3afdf");