package cn.feast.coding.mapper.system;


import cn.feast.coding.model.system.Permission;
import cn.feast.coding.model.system.Role;
import cn.feast.coding.model.system.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created By FeastCoding.
 */
public interface UserMapper {
    Integer save(User model);

    void update(User model);

    void deleteById(Integer id);

    int queryByCount(User model);

    List<User> queryByList(Map paramsMap);

    List<User> queryByUser(User model);

    User queryById(Integer id);

    User findByUsername(@Param("username") String username);

    List<Role> findRoles(String username);

    List<Permission> findPermissions(String username);
}