package com.gyee.runeconomy.mapper.auto;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gyee.runeconomy.model.auto.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author wang
 * @since 2023-07-25
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    //    @Select("SELECT d.nem_code FROM system_dept as d,system_users as u where u.dept_id=d.id and u.id=#{userId} ")
    //    @Select("SELECT d.leader FROM sys_dept as d,sys_user as u where u.dept_id=d.dept_id and u.user_id=#{userId} ")

    @Select("SELECT d.nemcode FROM system_dept as d,system_users as u where u.dept_id=d.id and u.id=#{userId} ")
    public List<String> getUserByuserId(@Param(value = "userId") Long userId);
}
