package com.example.mapper;

import com.example.entity.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;

public interface PatientMapper extends BaseMapper<Patient> {

    /**
      * 查询所有
    */
    List<Patient> selectAll(Patient patient);

    /**
      * 根据ID查询
    */
    Patient selectById(Integer id);

    /**
      * 删除
    */
    int deleteById(Integer id);

	@Select("select * from patient where `username` = #{name}")
	Patient selectByUsername(@Param("name") String userName);
} 