package com.enterprise.manage.common.base;

import com.enterprise.manage.common.tools.secure.SecurityUtil;
import com.enterprise.manage.common.web.response.ResultController;
import com.enterprise.manage.modules.system.domain.po.User;

/**
 * Base Controller (基础控制器类)
 *
 * @author PeiZhi Guo
 * 2021-2-18 15:58
 */
public class BaseController extends ResultController {

    /**
     * 获取当前登录用户的信息
     *
     * Return SysUser
     */
    protected static User getCurrentUser() {
        return (User) SecurityUtil.getAuthentication().getPrincipal();
    }
}
