优化
This commit is contained in:
@@ -30,9 +30,6 @@ public class DemoEnvironmentJob {
|
||||
private final DictItemMapper dictItemMapper;
|
||||
private final DictMapper dictMapper;
|
||||
private final StorageMapper storageMapper;
|
||||
private final NoticeMapper noticeMapper;
|
||||
private final MessageMapper messageMapper;
|
||||
private final MessageUserMapper messageUserMapper;
|
||||
private final UserMapper userMapper;
|
||||
private final UserRoleMapper userRoleMapper;
|
||||
private final UserSocialMapper userSocialMapper;
|
||||
@@ -67,10 +64,6 @@ public class DemoEnvironmentJob {
|
||||
this.log(dictCount, "字典");
|
||||
Long storageCount = storageMapper.lambdaQuery().gt(StorageDO::getId, DELETE_FLAG).count();
|
||||
this.log(storageCount, "存储");
|
||||
Long noticeCount = noticeMapper.lambdaQuery().gt(NoticeDO::getId, DELETE_FLAG).count();
|
||||
this.log(noticeCount, "公告");
|
||||
Long messageCount = messageMapper.lambdaQuery().count();
|
||||
this.log(messageCount, "通知");
|
||||
Long userCount = userMapper.lambdaQuery().notIn(UserDO::getId, USER_FLAG).count();
|
||||
this.log(userCount, "用户");
|
||||
Long roleCount = roleMapper.lambdaQuery().notIn(RoleDO::getId, ROLE_FLAG).count();
|
||||
@@ -83,8 +76,6 @@ public class DemoEnvironmentJob {
|
||||
this.log(clientCount, "终端");
|
||||
InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().blockAttack(true).build());
|
||||
SnailJobLog.REMOTE.info("演示环境待清理数据项检测完成,开始执行清理。");
|
||||
// 清理关联数据
|
||||
messageUserMapper.lambdaUpdate().gt(MessageUserDO::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();
|
||||
@@ -100,12 +91,6 @@ public class DemoEnvironmentJob {
|
||||
this.clean(storageCount, "存储", null, () -> storageMapper.lambdaUpdate()
|
||||
.gt(StorageDO::getId, DELETE_FLAG)
|
||||
.remove());
|
||||
this.clean(noticeCount, "公告", null, () -> noticeMapper.lambdaUpdate()
|
||||
.gt(NoticeDO::getId, DELETE_FLAG)
|
||||
.remove());
|
||||
this.clean(messageCount, "通知", null, () -> messageMapper.lambdaUpdate()
|
||||
.gt(MessageDO::getId, MESSAGE_FLAG)
|
||||
.remove());
|
||||
this.clean(userCount, "用户", null, () -> userMapper.lambdaUpdate().notIn(UserDO::getId, USER_FLAG).remove());
|
||||
this.clean(roleCount, "角色", null, () -> roleMapper.lambdaUpdate().notIn(RoleDO::getId, ROLE_FLAG).remove());
|
||||
this.clean(menuCount, "菜单", CacheConstants.ROLE_MENU_KEY_PREFIX, () -> menuMapper.lambdaUpdate()
|
||||
|
||||
Reference in New Issue
Block a user