<?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.yiboshi.science.dao.ComFileDAO"> <sql id="allColumns"> t.id as id, t.download_id as downloadId, t.object_id as objectId, t.file_explain as fileExplain, t.created as created </sql> <select id="getListByObjectId" parameterType="java.util.Map" resultType="com.yiboshi.science.param.dto.ComFileDTO"> SELECT a.*,b.download_url,b.file_name FROM com_file a left join com_download b on a.download_id=b.id where object_id=#{objectId} and file_type=#{fileType} order by a.show_index </select> </mapper>