修改重复提交状态码为12202
parent
7fd5caec09
commit
500ff7f3d3
|
@ -1,15 +1,17 @@
|
||||||
package com.mcwl.framework.interceptor;
|
package com.mcwl.framework.interceptor;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.mcwl.common.annotation.RepeatSubmit;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.mcwl.common.constant.HttpStatus;
|
||||||
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
|
import com.mcwl.common.utils.ServletUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.method.HandlerMethod;
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
import com.alibaba.fastjson2.JSON;
|
|
||||||
import com.mcwl.common.annotation.RepeatSubmit;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.mcwl.common.utils.ServletUtils;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 防止重复提交拦截器
|
* 防止重复提交拦截器
|
||||||
|
@ -31,7 +33,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor
|
||||||
{
|
{
|
||||||
if (this.isRepeatSubmit(request, annotation))
|
if (this.isRepeatSubmit(request, annotation))
|
||||||
{
|
{
|
||||||
AjaxResult ajaxResult = AjaxResult.error(annotation.message());
|
AjaxResult ajaxResult = AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,annotation.message());
|
||||||
ServletUtils.renderString(response, JSON.toJSONString(ajaxResult));
|
ServletUtils.renderString(response, JSON.toJSONString(ajaxResult));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue