修改重复提交状态码为12202
parent
7fd5caec09
commit
500ff7f3d3
|
@ -1,15 +1,17 @@
|
|||
package com.mcwl.framework.interceptor;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.mcwl.common.annotation.RepeatSubmit;
|
||||
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.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.mcwl.common.annotation.RepeatSubmit;
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
import com.mcwl.common.utils.ServletUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* 防止重复提交拦截器
|
||||
|
@ -31,7 +33,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor
|
|||
{
|
||||
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));
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue