Fix: 当流程ID配置没有中缀的时候不设置过期时间

This commit is contained in:
Xixiang Chen 2025-05-19 17:52:02 +08:00 committed by GitHub
parent e00bfd02a1
commit ea283dd85a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ public class BpmProcessIdRedisDAO {
String noPrefix = processIdRule.getPrefix() + infix + processIdRule.getPostfix(); String noPrefix = processIdRule.getPrefix() + infix + processIdRule.getPostfix();
String key = RedisKeyConstants.BPM_PROCESS_ID + noPrefix; String key = RedisKeyConstants.BPM_PROCESS_ID + noPrefix;
Long no = stringRedisTemplate.opsForValue().increment(key); Long no = stringRedisTemplate.opsForValue().increment(key);
if (StrUtil.isEmpty(infix)) { if (StrUtil.isNotEmpty(infix)) {
// 特殊没有前缀则不能过期不能每次都是从 0 开始 // 特殊没有前缀则不能过期不能每次都是从 0 开始
stringRedisTemplate.expire(key, Duration.ofDays(1L)); stringRedisTemplate.expire(key, Duration.ofDays(1L));
} }