!154 修复防重复提交bug

Merge pull request !154 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-05-05 04:01:58 +00:00 committed by Gitee
commit f41f5386cc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -38,7 +38,7 @@ public class PreventDuplicateSubmissionsInterceptor {
try {
Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire());
//如果超过1或者设置的参数则表示重复提交了
if (count.intValue() >= preventDuplicateSubmissions.expire()) {
if (count.intValue() >= 1) {
throw new ServiceException(ResultCode.LIMIT_ERROR);
}
}