“djh”
3 天以前 d7471cff04678b91271bdc566bcbddf2f4ab04b7
multi-common/src/main/java/com/gkhy/exam/common/utils/SecurityUtils.java
@@ -19,6 +19,19 @@
        return userId != null && 1L == userId;
    }
    public static boolean adminUser(){
        if(getLoginUser() == null){
            return false;
        }
        if(getLoginUser().getUser().getId() == 1L){
            return true;
        }
        if(getLoginUser().getUser().getUserType() == 0){
            return true;
        }
       return false;
    }
    /**
     * 判断密码是否相同
     * @param rawPasword   真实密码
@@ -48,6 +61,24 @@
    /*
     **
     * 用户ID
     **/
    public static Long getCompanyId()
    {
        try
        {
            return getLoginUser().getUser().getCompanyId();
        }
        catch (Exception e)
        {
            throw new ApiException("获取用户公司异常");
        }
    }
    /**
     * 获取用户账户
     **/