<?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.modules.map.mapper.DangerAreaImportMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="dangerAreaImportResultMap" type="org.springblade.modules.map.entity.DangerAreaImportRecordEntity">

        <result column="import_time" property="importTime"/>
        <result column="import_status" property="importStatus"/>
        <result column="remark" property="remark"/>
        <result column="save_type" property="saveType"/>
        <result column="file_name" property="fileName"/>
    </resultMap>

    <resultMap id="dangerAreaImportResultVOMap" type="org.springblade.modules.map.vo.DangerAreaImportRecordVO">

        <result column="import_time" property="importTime"/>
        <result column="import_status" property="importStatus"/>
        <result column="remark" property="remark"/>
        <result column="save_type" property="saveType"/>
        <result column="file_name" property="fileName"/>
        <result column="real_name" property="createUserName"/>
    </resultMap>



    <select id="selectPage" resultMap="dangerAreaImportResultVOMap">
        SELECT
        d.*, u.real_name
        FROM
        map_danger_area_import_record d
        LEFT JOIN  blade_user u ON u.id = d.create_user
        WHERE
        d.is_deleted = 0
        order by d.import_time desc
    </select>
</mapper>
