package org.nl.system.service.user.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.nl.common.domain.query.PageQuery;
import org.nl.system.service.user.dao.SysUser;
import org.nl.system.service.user.dto.SysUserDetail;
import org.nl.system.service.user.dto.UserDataPermissionDto;
import org.nl.system.service.user.dto.UserQuery;

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

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author generator
 * @since 2022-12-15
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    List<SysUserDetail> getUserDetail(@Param("query") UserQuery query, @Param("page")PageQuery page);

    List<Map<String,Object>> getDetailForMap(@Param("query") UserQuery query, @Param("page")PageQuery page);

    List<UserDataPermissionDto> getUserDataPermissionByPermissionId(String permissionId);

    List<UserDataPermissionDto> getUserDataPermissionByUserId(String userId);

    void deleteDataPermissionById(String userId);

    void insertDataPermission(@Param("dataPermission") UserDataPermissionDto dataPermission);

    List<String> getUserIdByDeptId(String deptId);
}
