add
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user