<?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="com.api.manage.dao.butlerService.SysFacilitiesMaintenanceRecordDao">

    <select id="list" parameterType="java.lang.Integer" resultType="com.api.vo.butlerService.VoFacilitiesMaintenanceRecord">
        select * from sys_facilities_maintenance_record
        where facilities_manage_id = #{facilitiesManageId}
        order by check_date desc
    </select>

    <insert id="insert" parameterType="com.api.model.butlerService.FacilitiesMaintenanceRecord">
        insert into sys_facilities_maintenance_record (
            facilities_manage_id,
            check_date,
            status,
            administrator,
            details,
            create_id,
            create_date
        ) value (
            #{facilitiesManageId},
            #{checkDate},
            #{status},
            #{administrator},
            #{details},
            #{createId},
            #{createDate}
        )
    </insert>

    <delete id="delete" parameterType="java.lang.Integer">
        delete from sys_facilities_maintenance_record where id = #{id}
    </delete>

</mapper>