|
|
@@ -1741,15 +1741,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
.or()
|
|
|
.eq(User::getIdCard,EncryptHandler.encrypt(bo.getAccount())));
|
|
|
User user = getOne(queryWrapper);
|
|
|
+ String tenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
+ Integer share = 1;
|
|
|
+ if (StringUtils.isNotBlank(tenantId)){
|
|
|
+ SysTenant sysTenant = iSysTenantService.getById(Long.valueOf(tenantId));
|
|
|
+ if (ObjectUtils.isNotNull(sysTenant)){
|
|
|
+ share = sysTenant.getShareClass();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if(Validator.isEmpty(user)){
|
|
|
iUserLoginErrorService.saveErrorLog(bo.getAccount());
|
|
|
//判断旧系统是否有账号
|
|
|
- oldAccountLogin(bo,1);
|
|
|
+ if (share > 0){
|
|
|
+ oldAccountLogin(bo,1);
|
|
|
+ }else {
|
|
|
+ throw new CustomException("登录信息错误");
|
|
|
+ }
|
|
|
}
|
|
|
else if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
|
|
|
{
|
|
|
//判断旧系统是否有账号
|
|
|
- oldAccountLogin(bo,1);
|
|
|
+ if (share > 0){
|
|
|
+ oldAccountLogin(bo,1);
|
|
|
+ }else {
|
|
|
+ throw new CustomException("对不起,您的账号:已停用");
|
|
|
+ }
|
|
|
}
|
|
|
String password = null;
|
|
|
if(bo.getPwd().length()>20){
|
|
|
@@ -1769,7 +1786,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
{
|
|
|
iUserLoginErrorService.saveErrorLog(bo.getAccount());
|
|
|
//判断旧系统是否有账号
|
|
|
- oldAccountLogin(bo,1);
|
|
|
+ if (share > 0){
|
|
|
+ oldAccountLogin(bo,1);
|
|
|
+ }else {
|
|
|
+ throw new CustomException("登录信息错误");
|
|
|
+ }
|
|
|
}
|
|
|
//如果活动分销码变动
|
|
|
if (StringUtils.isNotBlank(bo.getShareActivityCode())){
|