<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.person.mapper.ElderlyPeopleMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="elderlyPeopleResultMap" type="org.springblade.person.entity.ElderlyPeople">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="parent_id" property="parentId"/>
        <result column="medical_history" property="medicalHistory"/>
        <result column="children" property="children"/>
        <result column="hobby" property="hobby"/>
        <result column="addiction" property="addiction"/>
        <result column="ability" property="ability"/>
        <result column="dysfunction" property="dysfunction"/>
        <result column="blood_pressure" property="bloodPressure"/>
        <result column="blood_oxygen" property="bloodOxygen"/>
        <result column="blood_sugar" property="bloodSugar"/>
        <result column="service_demand" property="serviceDemand"/>
        <result column="emergency_contact_person" property="emergencyContactPerson"/>
        <result column="emergency_contact_phone" property="emergencyContactPhone"/>
    </resultMap>


    <select id="selectElderlyPeoplePage" resultMap="elderlyPeopleResultMap">
        select * from personnel_elderly_people where is_deleted = 0
    </select>

</mapper>
