package com.mosty.common.core.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.common.core.business.entity.SysUser;
import com.mosty.common.core.business.entity.vo.SysUserDeptVO;
import com.mosty.common.core.business.entity.vo.SysUserVO;
import com.mosty.common.core.business.entity.vo.UserDeptPage;
import com.mosty.common.core.business.entity.vo.UserPage;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  用户服务dao层
 * @author kevin
 * @date 2022/2/12 10:10 PM
 * @since 1.0.0
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @ApiOperation("分页查询用户信息")
    List<SysUserVO> selectByPage(@Param("userPage") UserPage userPage);

    @ApiOperation("查询用户部门分页")
    IPage<SysUserDeptVO> selectUserDeptPage(@Param("userDeptPage") UserDeptPage userDeptPage);

    @ApiOperation("获取部门下的所有的人员数据（包含子部门）")
    List<SysUser> getUserListByDeptId(@Param("deptIds") List<String> deptIds,
                                      @Param("keyword") String keyword);

    @ApiOperation("获取部门下的所有人员")
    List<SysUser> getUserListByDeptIdOne(Long id);

    @ApiOperation("查询用户数量")
    int selectByCount(@Param("userPage") UserPage userPage);


    @ApiOperation("删除用户信息")
    void delById(Long id);
}




