随机生成编号与按规则生成编号
1.随机生成编号(雪花算法) int month = Calendar.getInstance().get(Calendar.MONTH); Snowflake snowflake = IdUtil.createSnowflake(month, month); Long.toString(snowflake.nextId())2.按规则生成编号(redis)拼接key放入redis中,作为生成新编号的依据 @Autowired private RedisTemplate redisTe