修复防重复提交bug
This commit is contained in:
parent
26c9160c75
commit
f4a7d8ea92
@ -38,7 +38,7 @@ public class PreventDuplicateSubmissionsInterceptor {
|
|||||||
try {
|
try {
|
||||||
Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire());
|
Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire());
|
||||||
//如果超过1或者设置的参数,则表示重复提交了
|
//如果超过1或者设置的参数,则表示重复提交了
|
||||||
if (count.intValue() >= preventDuplicateSubmissions.expire()) {
|
if (count.intValue() >= 1) {
|
||||||
throw new ServiceException(ResultCode.LIMIT_ERROR);
|
throw new ServiceException(ResultCode.LIMIT_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user