package com.fs.hospital.mapper;

import java.util.List;
import com.fs.hospital.domain.HospitalMember;
import org.apache.ibatis.annotations.Select;

/**
 * 诊所会员Mapper接口
 *
 * @author fs
 * @date 2024-03-04
 */
public interface HospitalMemberMapper
{
    /**
     * 查询诊所会员
     *
     * @param memberId 诊所会员主键
     * @return 诊所会员
     */
    public HospitalMember selectHospitalMemberByMemberId(Long memberId);

    /**
     * 查询诊所会员列表
     *
     * @param hospitalMember 诊所会员
     * @return 诊所会员集合
     */
    public List<HospitalMember> selectHospitalMemberList(HospitalMember hospitalMember);

    /**
     * 新增诊所会员
     *
     * @param hospitalMember 诊所会员
     * @return 结果
     */
    public int insertHospitalMember(HospitalMember hospitalMember);

    /**
     * 修改诊所会员
     *
     * @param hospitalMember 诊所会员
     * @return 结果
     */
    public int updateHospitalMember(HospitalMember hospitalMember);

    /**
     * 删除诊所会员
     *
     * @param memberId 诊所会员主键
     * @return 结果
     */
    public int deleteHospitalMemberByMemberId(Long memberId);

    /**
     * 批量删除诊所会员
     *
     * @param memberIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteHospitalMemberByMemberIds(Long[] memberIds);

    @Select("select * from hospital_member where patient_id = #{patientId}")
    HospitalMember selectHospitalMemberByPatientId(Long patientId);
}
