package com.jkcredit.invoice.hub.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jkcredit.invoice.hub.model.dto.user.UserDto;
import com.jkcredit.invoice.hub.model.po.user.UserPo;
import org.apache.ibatis.annotations.Param;

import java.util.Optional;

public interface UserMapper extends BaseMapper<UserPo> {
    Optional<UserPo> getUserByUserName(String userName);

    IPage<UserPo> getUsersPage(Page page, @Param("query") UserDto userDto);

    UserPo getUserById(Long id);

    UserPo getUserByAppKey(String appKey);
}
