package com.winsun.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.winsun.bean.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.Map;

@Mapper
@Component
public interface StudentMapper extends BaseMapper<Student> {

    @Select("SELECT * FROM hhr_student WHERE stu_name = #{name} AND id_card = #{idCard}")
    Map<String,Object> selectStudentByNameAndIdCard(@Param("name") String name, @Param("idCard") String idCard);

    @Select("SELECT * FROM hhr_student WHERE id = #{id}")
    Map<String,Object> getStuById(@Param("id") String id);

}
