Commit 48bb65f7 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent b18fafa1
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.auth.handler; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.auth.handler;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.CharsetUtil;
import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.yifu.cloud.plus.v1.yifu.auth.constants.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.auth.constants.SecurityConstants;
...@@ -122,6 +123,7 @@ public class YifuWxLoginSuccessHandler implements AuthenticationSuccessHandler { ...@@ -122,6 +123,7 @@ public class YifuWxLoginSuccessHandler implements AuthenticationSuccessHandler {
private void backResult(HttpServletResponse response, R result) throws IOException { private void backResult(HttpServletResponse response, R result) throws IOException {
response.setCharacterEncoding(CharsetUtil.UTF_8); response.setCharacterEncoding(CharsetUtil.UTF_8);
response.setContentType(CommonConstants.CONTENT_TYPE); response.setContentType(CommonConstants.CONTENT_TYPE);
response.setStatus(HttpStatus.HTTP_OK);
PrintWriter printWriter = response.getWriter(); PrintWriter printWriter = response.getWriter();
printWriter.append(objectMapper.writeValueAsString(result)); printWriter.append(objectMapper.writeValueAsString(result));
log.info("登录成功返回结果1111111:"+objectMapper.writeValueAsString(result)); log.info("登录成功返回结果1111111:"+objectMapper.writeValueAsString(result));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment