This commit is contained in:
2023-05-26 17:52:34 +08:00
parent dd1ab6e74e
commit 21632ef7cb
13 changed files with 96 additions and 18 deletions

View File

@ -1,5 +1,8 @@
package com.qiaoba.common.web.utils;
import cn.hutool.json.JSONUtil;
import com.qiaoba.common.base.result.AjaxResult;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -18,4 +21,8 @@ public class ResponseUtil {
response.getWriter().write(msg);
}
public static void errorAuth(HttpServletResponse response, Integer code, String msg) throws IOException {
AjaxResult result = AjaxResult.error(code, msg);
response(response, JSONUtil.toJsonStr(result));
}
}