Commit 03df5ed7 by qwmqiuwenmin

fix

parent 72b15c49
......@@ -9,8 +9,10 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.dubbo.common.URL;
import com.alibaba.fastjson.JSON;
import com.gic.commons.util.ToolUtil;
import com.gic.commons.web.ResponseThreadLocal;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.service.StaffApiService;
......@@ -80,8 +82,11 @@ public class LoginController extends WebBaseController{
String redirectUri = config.getHost() + "index";
redirectUri = redirectUri.replace("haoban-manage3-web", "haoban-3/#");
String token = ToolUtil.randomUUID() + "-" + ToolUtil.randomStringByTime();
AuthRequestUtil.setAppLoginUser(token, loginVO);
try {
response.sendRedirect(redirectUri);
response.setHeader("token", token);
} catch (IOException e) {
logger.warn("异常", e);
}
......@@ -102,7 +107,7 @@ public class LoginController extends WebBaseController{
@RequestMapping("get-login-info")
public HaobanResponse getLoginInfo(){
LoginVO loginVO = (LoginVO) AuthRequestUtil.getSessionUser();
LoginVO loginVO = (LoginVO) AuthRequestUtil.getAppLoginUser();
return resultResponse(HaoBanErrCode.ERR_1,loginVO);
}
......@@ -128,8 +133,11 @@ public class LoginController extends WebBaseController{
AuthRequestUtil.setSessionUser(loginVO);
String redirectUri = config.getHost() + "index";
redirectUri = redirectUri.replace("haoban-manage3-web", "haoban-3/#");
String token = ToolUtil.randomUUID() + "-" + ToolUtil.randomStringByTime();
AuthRequestUtil.setAppLoginUser(token, loginVO);
try {
response.sendRedirect(redirectUri);
response.setHeader("token", token);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
......
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