| | |
| | | and zip_url = #{terms.zipUrl} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '0' |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | |
| | | <!-- 查看附件组件-分类查询附件-结果集 --> |
| | | <resultMap id="fileByCatDTO" type="cn.huge.module.file.domain.dto.FileForCatDTO"> |
| | | |
| | | </resultMap> |
| | | <!-- 查看附件组件-分类查询附件 --> |
| | | <sql id="listFileByCatTerms-where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.mainId != null and terms.mainId !=''"> |
| | | and t2.main_id = #{terms.mainId} |
| | | </if> |
| | | <if test="terms.ownerCat != null and terms.ownerCat !=''"> |
| | | and t2.owner_cat = #{terms.ownerCat} |
| | | </if> |
| | | <if test="terms.uploaderType != null and terms.uploaderType !=''"> |
| | | and t2.uploader_type = #{terms.uploaderType} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 查看附件组件-分类查询附件 --> |
| | | <select id="listFileByCatTerms" resultMap="fileByCatDTO"> |
| | | select t1.id, t1.name, t1.true_name as trueName, |
| | | t1.suffix, t1.size, t1.unit, t1.show_url as showUrl, t1.down_url as downUrl, |
| | | t2.owner_cat as ownerCat, t2.uploader_id as uploaderId, t2.uploader_name as uploaderName, |
| | | t2.uploader_type as uploaderType, t2.create_time as uploadTime |
| | | from dyh_file_info t1 |
| | | left join dyh_file_relate t2 on t1.id = t2.file_id |
| | | <include refid="listFileByCatTerms-where-part"/> |
| | | </select> |
| | | |
| | | </mapper> |