package org.linlinjava.jz.admin.util;

import org.apache.shiro.SecurityUtils;
import org.linlinjava.jz.db.domain.SysUser;

public class SecurityHelper {

    public static int getAdminId(){
        SysUser admin = (SysUser) SecurityUtils.getSubject().getPrincipal();
        return admin.getId().intValue();
    }

    public static String getAdminName(){
        SysUser admin = (SysUser) SecurityUtils.getSubject().getPrincipal();
        return admin.getUserName();
    }
}
