|
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Department;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Department;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Oauthuser;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Oauthuser;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Roles;
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Roles;
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Tenant;
|
|
|
|
import cn.jyjz.xiaoyao.admin.service.*;
|
|
|
|
import cn.jyjz.xiaoyao.admin.service.*;
|
|
|
|
import cn.jyjz.xiaoyao.common.base.config.XiaoyaoConfig;
|
|
|
|
import cn.jyjz.xiaoyao.common.base.config.XiaoyaoConfig;
|
|
|
|
import cn.jyjz.xiaoyao.common.base.exception.CommonExceptionCodeEnum;
|
|
|
|
import cn.jyjz.xiaoyao.common.base.exception.CommonExceptionCodeEnum;
|
|
|
@ -34,6 +35,7 @@ import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
|
|
|
|
import com.auth0.jwt.exceptions.TokenExpiredException;
|
|
|
|
import com.auth0.jwt.exceptions.TokenExpiredException;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@ -80,6 +82,9 @@ public class UserTokenServiceImpl implements UserTokenService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private UserTokenOnlineService userTokenOnlineService;
|
|
|
|
private UserTokenOnlineService userTokenOnlineService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private TenantService tenantService;
|
|
|
|
|
|
|
|
|
|
|
|
public User findByLoginname(String loginname) {
|
|
|
|
public User findByLoginname(String loginname) {
|
|
|
|
|
|
|
|
|
|
|
|
cn.jyjz.xiaoyao.admin.dataobject.User userData = userService.findByLoginname(loginname);
|
|
|
|
cn.jyjz.xiaoyao.admin.dataobject.User userData = userService.findByLoginname(loginname);
|
|
|
@ -380,4 +385,17 @@ public class UserTokenServiceImpl implements UserTokenService {
|
|
|
|
public Long listMobileCount(String otherno,String mobile){
|
|
|
|
public Long listMobileCount(String otherno,String mobile){
|
|
|
|
return userTenantService.listMobileCount(otherno,mobile);
|
|
|
|
return userTenantService.listMobileCount(otherno,mobile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 查询租户状态是否禁用
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean getTenantStatus(String agentcode){
|
|
|
|
|
|
|
|
LambdaQueryWrapper<Tenant> tenantLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
|
|
|
tenantLambdaQueryWrapper.eq(Tenant::getOtherno,agentcode);
|
|
|
|
|
|
|
|
Tenant tenant = tenantService.getOne(tenantLambdaQueryWrapper);
|
|
|
|
|
|
|
|
return tenant != null && tenant.getStatus() == 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|