package com.ruoyi.member.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.member.domain.MemberUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.member.vo.MemberUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 会员Mapper接口
 *
 * @author pqz
 * @date 2025-03-17
 */
@Mapper
public interface MemberUserMapper extends BaseMapper<MemberUser> {

    /**
     * 分页查询会员
     *
     * @param entity {@link MemberUserVO}
     * @param page   分页参数
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.member.domain.MemberUser>
     * @author PQZ
     * @date 15:34 2025/3/17
     **/
    IPage<MemberUserVO> queryListPage(@Param("entity") MemberUserVO entity, Page<MemberUserVO> page);

    /**
     * 通过userId和用户类型查询用户信息
     *
     * @param userId   用户表id
     * @param userType 用户类型
     * @return com.ruoyi.member.vo.MemberUserVO
     * @author PQZ
     * @date 11:45 2025/3/21
     **/
    MemberUserVO queryByUserId(@Param("userId") Long userId, @Param("userType") String userType);
}
