<?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="cn.iocoder.yudao.module.knowledge.mapper.TMapImageMapper" >


  <select id="selectByMapId" resultType="cn.iocoder.yudao.module.knowledge.entity.TMapImage">
    SELECT
    id AS id,
    filename AS filename,
    file_size AS fileSize,
    file_url AS fileUrl,
    sort AS sort,
    map_code AS mapCode,
    dept_id AS deptId,
    identity_id AS identityId,
    create_time AS createTime,
    update_time AS updateTime,
    creator AS creator,
    map_id AS mapId
    FROM
        t_map_image
    WHERE
        map_id = #{id}
        AND
          deleted = 0
    ORDER BY
      create_time DESC
  </select>


</mapper>
