Commit 6f69b2a3 authored by guangjing.gao's avatar guangjing.gao

默认羊小咩,无需校验租户ID是否为空

parent 5630a2df
......@@ -52,8 +52,6 @@ public class UserCenterServiceImpl implements UserCenterService {
List<UserAttached> userAttacheds = userAttachedRepository.findByUserIdIn(userIds);
if (!tenantId.equals(TenantUtil.TENANT_DEFAULT)) {
if (userAttacheds != null) {
//租户ID校验
if (!TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
List<User> users = userRepository.findByIdIn(userIds);
List<User> productUsers = tenantService.selectUsersByTenantId(users, tenantId);
if (productUsers != null) {
......@@ -66,7 +64,6 @@ public class UserCenterServiceImpl implements UserCenterService {
}
return resultProductUsers;
}
}
}else {
List<User> users = userRepository.findByIdIn(userIds);
List<User> productUsers = tenantService.validationTentIdByTentId(users, tenantId);
......
......@@ -113,7 +113,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
Map<Long, String> userIdAndPhoneMap = Maps.newHashMap();
List<User> users = userRepository.findByIdIn(userIds);
//校验租户ID
if (!TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
if (!tenantId.equals(tenantId)) {
users = tenantService.selectUsersByTenantId(users, tenantId);
}else {
users = tenantService.validationTentIdByTentId(users, tenantId);
......@@ -390,10 +390,8 @@ public class UserServiceImpl implements IUserService, IBaseController {
} catch (Exception e) {
log.info("神策埋点出现问题", e);
}
//校验租户ID tenantId
if (!TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
oauthLoginInfoService.addLoginInfo(user, tenantId);
}
LoginProperties loginProperties = new LoginProperties("", 3, channelId, createdFrom, appChannel, merchant.getId(), merchant.getName(), tenantId);
AuthBean session = sessionService.createSession(user, loginProperties);
session.setRegister(register);
......@@ -507,24 +505,18 @@ public class UserServiceImpl implements IUserService, IBaseController {
.collect(Collectors.toList());
List<User> users = userRepository.findByIdIn(collect);
if (!tenantId.equals(TenantUtil.TENANT_DEFAULT)) {
if (!TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
return tenantService.selectUsersByTenantId(users, tenantId);
}
}else {
return tenantService.validationTentIdByTentId(users, tenantId);
}
return users;
} else { //不是1 就是 uuids
List<User> users = userRepository.findByUuidIn(vals);
if (!tenantId.equals(TenantUtil.TENANT_DEFAULT)) {
if (!TenantUtil.validationTenantIdIsNullOrZero(tenantId)) {
return tenantService.selectUsersByTenantId(users, tenantId);
}else {
return tenantService.validationTentIdByTentId(users, tenantId);
}
}
return users;
}
}
@Override
......
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