zhaowenxuan
2025-02-27 b8f2e278bf413f3207496f30cc00f6f62e8e1399
ltkj-common/src/main/java/com/ltkj/common/utils/IdUtils.java
@@ -31,6 +31,7 @@
        String currentDate = new SimpleDateFormat("yyyyMMdd").format(new Date());
        String storedDate = stringRedisTemplate.opsForValue().get(LIS_CURRENT_DATE_KEY);
        String lastIdStr = stringRedisTemplate.opsForValue().get(LIS_LAST_ID_KEY);
        if (StrUtil.isBlank(lastIdStr))lastIdStr = "0";
        int lastId;
        if (storedDate == null || !storedDate.equals(currentDate)) {
            lastId = 1;