<?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.PsychiatricMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="psychiatricResultMap" type="org.springblade.person.entity.Psychiatric">
        <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="name" property="name"/>
        <result column="economic_status" property="economicStatus"/>
        <result column="sub_allowance" property="subAllowance"/>
        <result column="guardian_id_card" property="guardianIdCard"/>
        <result column="guardian_name" property="guardianName"/>
        <result column="guardian_phone" property="guardianPhone"/>
        <result column="pathogenesis_date" property="pathogenesisDate"/>
        <result column="type" property="type"/>
        <result column="accident_history" property="accidentHistory"/>
        <result column="accident_count" property="accidentCount"/>
        <result column="accident_date" property="accidentDate"/>
        <result column="level" property="level"/>
        <result column="treat_situation" property="treatSituation"/>
        <result column="hospital_name" property="hospitalName"/>
        <result column="organization_name" property="organizationName"/>
        <result column="disease" property="disease"/>
        <result column="person_type" property="personType"/>
    </resultMap>


    <select id="selectPsychiatricPage" resultMap="psychiatricResultMap">
        select * from personnel_psychiatric where is_deleted = 0
    </select>

</mapper>
