From 3bee4f222c85c05299c1e9a55af57e007f9097d3 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 30 Dec 2025 22:37:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E6=BC=94=E7=A4=BA=E7=8E=AF=E5=A2=83=E6=95=B0=E6=8D=AE=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E7=90=86=E7=94=A8=E6=88=B7=E8=A7=92=E8=89=B2=E3=80=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AC=AC=E4=B8=89=E6=96=B9=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/top/continew/admin/job/DemoEnvironmentJob.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/continew-server/src/main/java/top/continew/admin/job/DemoEnvironmentJob.java b/continew-server/src/main/java/top/continew/admin/job/DemoEnvironmentJob.java index 9ec81b6a..8025f262 100644 --- a/continew-server/src/main/java/top/continew/admin/job/DemoEnvironmentJob.java +++ b/continew-server/src/main/java/top/continew/admin/job/DemoEnvironmentJob.java @@ -32,7 +32,6 @@ import top.continew.admin.system.mapper.user.UserMapper; import top.continew.admin.system.mapper.user.UserSocialMapper; import top.continew.admin.system.model.entity.*; import top.continew.admin.system.model.entity.user.UserDO; -import top.continew.admin.system.model.entity.user.UserSocialDO; import top.continew.admin.tenant.mapper.PackageMapper; import top.continew.admin.tenant.mapper.PackageMenuMapper; import top.continew.admin.tenant.mapper.TenantMapper; @@ -80,6 +79,7 @@ public class DemoEnvironmentJob { .of(1L, 547889293968801822L, 547889293968801823L, 547889293968801824L, 547889293968801825L, 547889293968801826L, 547889293968801827L, 547889293968801828L, 547889293968801829L, 547889293968801830L, 547889293968801831L, 547889293968801832L, 547889293968801833L, 547889293968801834L); private static final List ROLE_FLAG = List.of(1L, 2L, 3L, 547888897925840927L, 547888897925840928L); private static final Long DEPT_FLAG = 547887852587843611L; + private static final Long USER_ROLE_FLAG = 14L; /** * 重置演示环境数据 @@ -123,12 +123,12 @@ public class DemoEnvironmentJob { // 清理关联数据 noticeLogMapper.lambdaUpdate().gt(NoticeLogDO::getNoticeId, DELETE_FLAG).remove(); messageLogMapper.lambdaUpdate().gt(MessageLogDO::getMessageId, MESSAGE_FLAG).remove(); - userRoleMapper.lambdaUpdate().notIn(UserRoleDO::getRoleId, ROLE_FLAG).remove(); - userRoleMapper.lambdaUpdate().notIn(UserRoleDO::getUserId, USER_FLAG).remove(); roleDeptMapper.lambdaUpdate().notIn(RoleDeptDO::getRoleId, ROLE_FLAG).remove(); roleMenuMapper.lambdaUpdate().notIn(RoleMenuDO::getRoleId, ROLE_FLAG).remove(); - userSocialMapper.lambdaUpdate().notIn(UserSocialDO::getUserId, USER_FLAG).remove(); + userRoleMapper.lambdaUpdate().gt(UserRoleDO::getId, USER_ROLE_FLAG).remove(); + userSocialMapper.lambdaUpdate().remove(); packageMenuMapper.lambdaUpdate().remove(); + SnailJobLog.REMOTE.info("关联表数据项清理完成。"); // 清理具体数据 this.clean(dictItemCount, "字典项", null, () -> dictItemMapper.lambdaUpdate() .gt(DictItemDO::getId, DELETE_FLAG)