限流返回类型转换数值型的格式

This commit is contained in:
RuoYi 2021-09-23 19:15:33 +08:00
parent 1a5881b1d0
commit f8cc7ce328
1 changed files with 2 additions and 2 deletions

View File

@ -68,12 +68,12 @@ public class RedisConfig extends CachingConfigurerSupport
"local time = tonumber(ARGV[2])\n" +
"local current = redis.call('get', key);\n" +
"if current and tonumber(current) > count then\n" +
" return current;\n" +
" return tonumber(current);\n" +
"end\n" +
"current = redis.call('incr', key)\n" +
"if tonumber(current) == 1 then\n" +
" redis.call('expire', key, time)\n" +
"end\n" +
"return current;";
"return tonumber(current);";
}
}