修改重复提交状态码为12202

master
Diyu0904 2025-03-21 16:12:22 +08:00
parent 7fd5caec09
commit 500ff7f3d3
1 changed files with 10 additions and 8 deletions

View File

@ -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;
}