<?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.ComConclusionThesisDAO"> <sql id="allColumns"> </sql> <select id="getListByObjectId" parameterType="java.lang.String" resultType="com.yiboshi.science.param.dto.ComConclusionThesisDTO"> SELECT a.*,b.download_url,b.file_name FROM com_conclusion_thesis a left join com_download b on a.download_id=b.id where a.conclusion_id=#{objectId} order by a.show_index asc </select> <select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComConclusionThesisDTO"> SELECT a.*,b.download_url,b.file_name,d.proj_name,d.proj_no,d.report_year,c.proj_id FROM com_conclusion_thesis a left join com_download b on a.download_id=b.id left join com_project_conclusion c on c.id=a.conclusion_id left join com_project d on c.proj_id=d.id <where> ${ew.sqlSegment} </where> ORDER BY a.created desc </select> </mapper>