package com.jpsoft.shinestar.modules.sys.service;

import java.util.List;
import java.util.Map;
import com.jpsoft.shinestar.modules.sys.entity.User;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface UserService {
	User get(String id);
	boolean exist(String id);
	int insert(User model);
	int update(User model);
	int delete(String id);
	List<User> list();
	List<User> findByCompanyId(String companyId);
	List<User> findByCompanyList(Map<String,Object> searchParams,List<Sort> sortList);
	Page<User> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
	User findByUserName(String userName);
	boolean hasRole(String userId, String roleName) ;
    User findByOpenId(String openId);
}