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

    <!-- 通用查询映射结果 -->
    <resultMap id="drugResultMap" type="org.springblade.person.entity.Drug">
        <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="reason" property="reason"/>
        <result column="source" property="source"/>
        <result column="detoxification" property="detoxification"/>
        <result column="attention" property="attention"/>
        <result column="drug_status" property="drugStatus"/>
        <result column="type" property="type"/>
        <result column="consequence" property="consequence"/>
        <result column="species" property="species"/>
        <result column="control_situation" property="controlSituation"/>
        <result column="controller_name" property="controllerName"/>
        <result column="controller_phone" property="controllerPhone"/>
        <result column="help_situation" property="helpSituation"/>
        <result column="helper_name" property="helperName"/>
        <result column="helper_phone" property="helperPhone"/>
        <result column="methadone" property="methadone"/>
        <result column="date" property="date"/>
        <result column="find_date" property="findDate"/>
        <result column="criminal_history" property="criminalHistory"/>
        <result column="crime" property="crime"/>
        <result column="action" property="action"/>
        <result column="living" property="living"/>
        <result column="relationship" property="relationship"/>
        <result column="performance" property="performance"/>
    </resultMap>


    <select id="selectDrugPage" resultMap="drugResultMap">
        select * from personnel_drug where is_deleted = 0
    </select>

</mapper>
