package cn.orm.abs;

import java.util.List;
import java.util.Map;
import org.springframework.security.core.Authentication;
import cn.pojo.entity.TSysDept;
import cn.pojo.entity.TSysRole;
import cn.pojo.entity.TSysRolePerm;
import cn.pojo.entity.TSysUser;
import cn.pojo.vo.LoginUser;

/**底层共通业务API，提供其他独立模块调用*/
public interface ICommonAPI  
{
	/**根据用户账号username查询用户信息*/
	TSysUser getUserByName(String username);
	
	/**根据用户username查询用户所在部门信息*/
	TSysDept getDeptByName(String username);
			
	/**根据name获取所有参与用户*/
    List<TSysUser> getUserListByNames(String[] userNames);
    List<TSysRole> getUserRole(Map<String,String> loginBody);
    
    TSysRolePerm getBtnPerm(String roleIds,String roleId);
	TSysRole getMenuPerm(String roleIds,String roleId);
	
	Boolean isAdminByRoleId(String roleId);
	String getRolekey(String roleId);
	String getRoleperm(String roleId);
	TSysDept getDeptInfo(int deptId);
	
	Boolean resetUserPwd(int userId, String password);
	Boolean updateUserAvatar(int userId, String avatar);
	
	LoginUser getLoginUser();
	Authentication getAuthentication();
}
