| | |
| | | RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class);
|
| | | if (annotation != null)
|
| | | {
|
| | | if (this.isRepeatSubmit(request))
|
| | | if (this.isRepeatSubmit(request, annotation))
|
| | | {
|
| | | AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试");
|
| | | AjaxResult ajaxResult = AjaxResult.error(annotation.message());
|
| | | ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult));
|
| | | return false;
|
| | | }
|
| | |
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public abstract boolean isRepeatSubmit(HttpServletRequest request);
|
| | | public abstract boolean isRepeatSubmit(HttpServletRequest request, RepeatSubmit annotation);
|
| | | }
|