소스 검색

Merge pull request #848 from nxiaoqidai/patch-3

Fix: 当流程ID配置没有中缀的时候不设置过期时间
芋道源码 5 달 전
부모
커밋
5cca48f7ea
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/dal/redis/BpmProcessIdRedisDAO.java

+ 1 - 1
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/dal/redis/BpmProcessIdRedisDAO.java

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