diff --git a/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java b/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java index 240bc27..55bd4a7 100644 --- a/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java +++ b/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java @@ -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; }