fix: 修复重置演示环境数据定时任务未能正确清除缓存的问题

This commit is contained in:
2025-02-10 21:16:55 +08:00
parent f6535ef7a3
commit dd484c9e0d

View File

@@ -30,6 +30,7 @@ import top.continew.admin.open.model.entity.AppDO;
import top.continew.admin.system.mapper.*;
import top.continew.admin.system.model.entity.*;
import top.continew.starter.cache.redisson.util.RedisUtils;
import top.continew.starter.core.constant.StringConstants;
import java.util.List;
import java.util.function.BooleanSupplier;
@@ -169,7 +170,7 @@ public class DemoEnvironmentJob {
if (count > 0 && supplier.getAsBoolean()) {
SnailJobLog.REMOTE.info("[{}] 数据项清理完成。", resource);
if (StrUtil.isNotBlank(cacheKey)) {
RedisUtils.deleteByPattern(cacheKey);
RedisUtils.deleteByPattern(cacheKey + StringConstants.ASTERISK);
SnailJobLog.REMOTE.info("[{}] 数据项缓存清理完成。", resource);
}
}