Commit 1b5dde1a authored by guangjing.gao's avatar guangjing.gao

免密登录,不存在自动注册

parent 5f41d1cb
...@@ -73,7 +73,7 @@ public class AppController implements IBaseController { ...@@ -73,7 +73,7 @@ public class AppController implements IBaseController {
@RequestParam(required = false) Integer tenantId, @RequestParam(required = false) Integer tenantId,
HttpServletRequest request) { HttpServletRequest request) {
if (tenantId == null) { if (TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
tenantId = TenantUtil.TENANT_DEFAULT; tenantId = TenantUtil.TENANT_DEFAULT;
} }
JsonResult result = null; JsonResult result = null;
...@@ -208,7 +208,11 @@ public class AppController implements IBaseController { ...@@ -208,7 +208,11 @@ public class AppController implements IBaseController {
@RequestParam(required = false, defaultValue = "1") Long registerFrom, @RequestParam(required = false, defaultValue = "1") Long registerFrom,
@RequestParam(required = false, defaultValue = "1") Long channelId, @RequestParam(required = false, defaultValue = "1") Long channelId,
@RequestParam(required = false, defaultValue = "") String appChannel, @RequestParam(required = false, defaultValue = "") String appChannel,
@RequestParam(required = false) Integer tenantId,
HttpServletRequest request) { HttpServletRequest request) {
if (TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
tenantId = TenantUtil.TENANT_DEFAULT;
}
if (!ValidationUtil.validatePhoneNo(phoneNo)) { if (!ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult(USER_ERROR_OR_PASSWORD_ERROR, null); return JsonResult.buildErrorStateResult(USER_ERROR_OR_PASSWORD_ERROR, null);
} }
...@@ -233,7 +237,11 @@ public class AppController implements IBaseController { ...@@ -233,7 +237,11 @@ public class AppController implements IBaseController {
if (merchant == null) { if (merchant == null) {
return JsonResult.buildErrorStateResult("无效的商户", null); return JsonResult.buildErrorStateResult("无效的商户", null);
} }
LoginProperties loginProperties = new LoginProperties("", 4, channelId, registerFrom, appChannel, merchant.getId(), merchant.getName(), null);
//租户下新增用户
oauthLoginInfoService.addLoginInfo(user, tenantId);
LoginProperties loginProperties = new LoginProperties("", 4, channelId, registerFrom, appChannel, merchant.getId(), merchant.getName(), tenantId);
AuthBean bean = sessionService.createSession(user, loginProperties); AuthBean bean = sessionService.createSession(user, loginProperties);
LoginInfo loginInfo = new LoginInfo(); LoginInfo loginInfo = new LoginInfo();
loginInfo.setUser(new UserRet(user)); loginInfo.setUser(new UserRet(user));
...@@ -312,7 +320,7 @@ public class AppController implements IBaseController { ...@@ -312,7 +320,7 @@ public class AppController implements IBaseController {
@RequestParam(required = false) Integer tenantId, @RequestParam(required = false) Integer tenantId,
HttpServletRequest request) { HttpServletRequest request) {
//默认羊小咩租户 //默认羊小咩租户
if (tenantId == null) { if (TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
tenantId = TenantUtil.TENANT_DEFAULT; tenantId = TenantUtil.TENANT_DEFAULT;
} }
if (!ValidationUtil.validatePhoneNo(phoneNo)) { if (!ValidationUtil.validatePhoneNo(phoneNo)) {
......
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