Commit 310a5dab by 陶光胜

登陆授权

parent 77d444b8
...@@ -153,7 +153,8 @@ public class LoginController { ...@@ -153,7 +153,8 @@ public class LoginController {
} }
@RequestMapping("login") @RequestMapping("login")
public RestResponse login(String nationCode, String phoneNumber, Integer enterpriseId, String password) { public RestResponse login(HttpServletRequest request, HttpServletResponse response,
String nationCode, String phoneNumber, Integer enterpriseId, String password, String appId) {
if (StringUtils.isBlank(password) || StringUtils.isBlank(phoneNumber) || enterpriseId == null) { if (StringUtils.isBlank(password) || StringUtils.isBlank(phoneNumber) || enterpriseId == null) {
return EnterpriseRestResponse.failure(ErrorCode.PARAMETER_ERROR); return EnterpriseRestResponse.failure(ErrorCode.PARAMETER_ERROR);
} }
...@@ -212,10 +213,18 @@ public class LoginController { ...@@ -212,10 +213,18 @@ public class LoginController {
//塞缓存 //塞缓存
UserDetailUtils.setUserDetail(userDetail); UserDetailUtils.setUserDetail(userDetail);
logger.info("登录所花时间:{}", System.currentTimeMillis() - startTime); logger.info("登录所花时间:{}", System.currentTimeMillis() - startTime);
if(StringUtils.isNotBlank(appId)){
try {
response.sendRedirect("https://four.gicdev.com/application-auth-center/auth/custom?authToken="+appId);
} catch (IOException e) {
e.printStackTrace();
}
} else {
return RestResponse.success(userDetail); return RestResponse.success(userDetail);
} }
} }
} }
}
return RestResponse.success(); return RestResponse.success();
} }
......
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