/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.xiaoniu.subsystem.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xiaoniu.subsystem.system.domain.SysUser;
import com.xiaoniu.subsystem.system.domain.dto.UserDetailVO;
import com.xiaoniu.subsystem.system.domain.dto.UserListQueryDTO;
import com.xiaoniu.subsystem.system.domain.vo.UserListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户信息表 Mapper 接口
 *
 * @author sst
 * @since 2024-11-26
 */
public interface SysUserMapper extends BaseMapper<SysUser> {


    /**
     * 获取用户列表
     *
     * @param dto dto
     * @return List<UserListVO>
     */
    List<UserListVO> selectUserList(@Param("page") IPage<UserListVO> page, @Param("dto") UserListQueryDTO dto);

    /**
     * 根据条件分页查询已配用户角色列表
     *
     * @param user
     * @return
     */
    List<SysUser> selectAllocatedList(SysUser user);

    /**
     * 根据条件分页查询未分配用户角色列表
     *
     * @param user
     * @return
     */
    List<SysUser> selectUnallocatedList(SysUser user);


    /**
     * @param userId
     * @return
     */
    UserDetailVO detail(@Param("userId") Long userId);
}
