<?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.ComDownloadDAO">
<sql id="allColumns">
t.id as id, t.download_url as downloadUrl, t.file_name as fileName, t.extension as extension, t.created as created, t.updated as updated
</sql>
<select id="getAllListByPage" resultType="com.yiboshi.science.param.dto.ComDownloadDTO">
select a.id as proj_id, a.app_no, a.proj_no, a.proj_name, a.report_year, b.file_id, c.*
from com_project a left join com_project_basic b on a.id = b.proj_id
left join com_download c on b.file_id = c.id
<where>
${ew.sqlSegment}
</where>
ORDER BY c.created desc
</select>
<select id="getDownloadByFileName" parameterType="java.lang.String" resultType="com.yiboshi.science.entity.ComDownload">
select * from com_download where download_url like concat('%', #{fileName}, '%')
</select>
</mapper>
-
徐俊 authored6857289b