Commit 86058b0d3b3ca610b434cda046a4754b115e094b

Authored by YunaiV
1 parent 0c68962a

fix:【BPM 工作流】当流程ID配置没有中缀的时候不设置过期时间

yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/dal/redis/BpmProcessIdRedisDAO.java
@@ -51,7 +51,7 @@ public class BpmProcessIdRedisDAO { @@ -51,7 +51,7 @@ public class BpmProcessIdRedisDAO {
51 String noPrefix = processIdRule.getPrefix() + infix + processIdRule.getPostfix(); 51 String noPrefix = processIdRule.getPrefix() + infix + processIdRule.getPostfix();
52 String key = RedisKeyConstants.BPM_PROCESS_ID + noPrefix; 52 String key = RedisKeyConstants.BPM_PROCESS_ID + noPrefix;
53 Long no = stringRedisTemplate.opsForValue().increment(key); 53 Long no = stringRedisTemplate.opsForValue().increment(key);
54 - if (StrUtil.isEmpty(infix)) { 54 + if (StrUtil.isNotEmpty(infix)) {
55 // 特殊:没有前缀,则不能过期,不能每次都是从 0 开始 55 // 特殊:没有前缀,则不能过期,不能每次都是从 0 开始
56 stringRedisTemplate.expire(key, Duration.ofDays(1L)); 56 stringRedisTemplate.expire(key, Duration.ofDays(1L));
57 } 57 }