Commit 631045b4 by 徐高华

登录

parent 56d1e5bc
...@@ -183,7 +183,7 @@ public class LoginController extends WebBaseController { ...@@ -183,7 +183,7 @@ public class LoginController extends WebBaseController {
} }
logger.info("登录商户={}",gicEnterpriseId); logger.info("登录商户={}",gicEnterpriseId);
String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response, String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response,
null, null, null); null, null, null,null);
if (StringUtils.isNotBlank(code)) { if (StringUtils.isNotBlank(code)) {
try { try {
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
...@@ -220,7 +220,7 @@ public class LoginController extends WebBaseController { ...@@ -220,7 +220,7 @@ public class LoginController extends WebBaseController {
return this.fail("商户超管的手机号未配置"); return this.fail("商户超管的手机号未配置");
} }
//运维单点登录信息:operationUserId userName : 运维realName //运维单点登录信息:operationUserId userName : 运维realName
String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, gicSuperPhone, "yw", response, operationUserId, userName,userMobile); String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, gicSuperPhone, "yw", response, operationUserId, userName,userMobile,null);
if (StringUtils.isNotBlank(code)) { if (StringUtils.isNotBlank(code)) {
return this.fail(this.errMessage(code)); return this.fail(this.errMessage(code));
} }
...@@ -232,7 +232,7 @@ public class LoginController extends WebBaseController { ...@@ -232,7 +232,7 @@ public class LoginController extends WebBaseController {
*/ */
@IgnoreLogin @IgnoreLogin
@RequestMapping("gic-login") @RequestMapping("gic-login")
public ModelAndView gicLogin(String random, String wxEnterpriseId, HttpServletResponse response) { public ModelAndView gicLogin(String random, String wxEnterpriseId, HttpServletResponse response , String hbPage) {
// 判断是否存在random // 判断是否存在random
AES aes = SecureUtil.aes(LOGIN_KEY.getBytes()); AES aes = SecureUtil.aes(LOGIN_KEY.getBytes());
String o = aes.decryptStr(random); String o = aes.decryptStr(random);
...@@ -288,7 +288,7 @@ public class LoginController extends WebBaseController { ...@@ -288,7 +288,7 @@ public class LoginController extends WebBaseController {
String userMobile = jsonObject.getString("userMobile"); String userMobile = jsonObject.getString("userMobile");
String errorCode = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response, String errorCode = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response,
operationUserId, userName, userMobile); operationUserId, userName, userMobile,hbPage);
if (StringUtils.isNotBlank(errorCode)) { if (StringUtils.isNotBlank(errorCode)) {
ModelAndView model = new ModelAndView( ModelAndView model = new ModelAndView(
new RedirectView("/haoban-3/#/gic-error?errorCode=" + errorCode, false, false)); new RedirectView("/haoban-3/#/gic-error?errorCode=" + errorCode, false, false));
...@@ -324,7 +324,7 @@ public class LoginController extends WebBaseController { ...@@ -324,7 +324,7 @@ public class LoginController extends WebBaseController {
// 登录逻辑 // 登录逻辑
private String doLogin(String wxEnterpriseId, String gicEnterpriseId, String loginPhoneNumber, String loginChannel, private String doLogin(String wxEnterpriseId, String gicEnterpriseId, String loginPhoneNumber, String loginChannel,
HttpServletResponse response, String operationUserId, String userName, String userMobile) { HttpServletResponse response, String operationUserId, String userName, String userMobile , String hbPage) {
//运维单点登录信息:operationUserId userName : 运维realName //运维单点登录信息:operationUserId userName : 运维realName
logger.info("doLogin={},{},{},{},{}",gicEnterpriseId,loginPhoneNumber, operationUserId, userName, userMobile); logger.info("doLogin={},{},{},{},{}",gicEnterpriseId,loginPhoneNumber, operationUserId, userName, userMobile);
WxApplicationDTO application = wxApplicationApiService.selectByWxEnterpriseIdAndApplicationType(wxEnterpriseId,2); WxApplicationDTO application = wxApplicationApiService.selectByWxEnterpriseIdAndApplicationType(wxEnterpriseId,2);
...@@ -383,7 +383,12 @@ public class LoginController extends WebBaseController { ...@@ -383,7 +383,12 @@ public class LoginController extends WebBaseController {
webLoginDTO.setOperationUserId(operationUserId); webLoginDTO.setOperationUserId(operationUserId);
webLoginDTO.setOperationUserName(userName); webLoginDTO.setOperationUserName(userName);
webLoginDTO.setClerkPhone(userMobile); webLoginDTO.setClerkPhone(userMobile);
String redirectUri = config.getHost() + "index"; String redirectUri = config.getHost() ;
if(StringUtils.isNotBlank(hbPage)) {
redirectUri += hbPage ;
}else {
redirectUri += "index" ;
}
redirectUri = redirectUri.replace("haoban-manage3-web", "haoban-3/#"); redirectUri = redirectUri.replace("haoban-manage3-web", "haoban-3/#");
String token = ToolUtil.randomUUID() + "-" + ToolUtil.randomStringByTime(); String token = ToolUtil.randomUUID() + "-" + ToolUtil.randomStringByTime();
AuthWebRequestUtil.setSessionUser(webLoginDTO); AuthWebRequestUtil.setSessionUser(webLoginDTO);
......
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