package com.util;

import com.sooka.common.core.controller.BaseController;
import com.sooka.system.domain.SysUser;
import com.sooka.system.service.ISysUserService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


/**
 *  用户信息工具
 */
@Component
public class UserInfoUtil extends BaseController {

    @Resource
    ISysUserService iSysUserService;

    /**
     * 获取PC端需要的登陆用户信息
     */

    public  SysUser getLoginUserInfo(){
        String username = getSession().getAttribute("loginusername").toString();
        SysUser user =  iSysUserService.selectUserByLoginName(username);
        return user;


    }
}
