<?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.homecare.alarmjob.mapper.AlarmJobMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="alarmJobResultMap" type="org.springblade.homecare.alarmjob.entity.AlarmJob">
        <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="alarm_id" property="alarmId"/>
        <result column="name" property="name"/>
        <result column="device_id" property="deviceId"/>
        <result column="device_name" property="deviceName"/>
        <result column="record_time" property="recordTime"/>
        <result column="device_type" property="deviceType"/>
        <result column="type_name" property="typeName"/>
        <result column="order_id" property="orderId"/>
        <result column="alarm_times" property="alarmTimes"/>
        <result column="alarm_type" property="alarmType"/>
        <result column="alarm_position" property="alarmPosition"/>
        <result column="handler" property="handler"/>
        <result column="phone" property="phone"/>
        <result column="job_status" property="jobStatus"/>
        <result column="metric" property="metric"/>
        <result column="level" property="level"/>
    </resultMap>


    <select id="selectAlarmJobPage" resultMap="alarmJobResultMap">
        select * from yc_alarm_job where is_deleted = 0
    </select>

</mapper>
