123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?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="org.springblade.manager.mapper.TableFileMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="tableFileResultMap" type="org.springblade.manager.entity.TableFile">
- <result column="id" property="id"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="tab_id" property="tabId"/>
- <result column="domain_url" property="domainUrl"/>
- <result column="name" property="name"/>
- <result column="extension" property="extension"/>
- <result column="type" property="type"/>
- <result column="domain_pdf_url" property="domainPdfUrl"/>
- <result column="trial_record_id" property="trialRecordId"/>
- </resultMap>
- <resultMap id="TableFileVO" type="org.springblade.manager.vo.TableFileVO">
- <result column="id" property="id"/>
- <result column="is_deleted" property="isDeleted"/>
- <result column="tab_id" property="tabId"/>
- <result column="domain_url" property="domainUrl"/>
- <result column="name" property="name"/>
- <result column="extension" property="extension"/>
- <result column="type" property="type"/>
- <result column="domain_pdf_url" property="domainPdfUrl"/>
- <result column="url" property="url"/>
- <result column="trial_record_id" property="trialRecordId"/>
- </resultMap>
- <select id="selectTableFilePage" resultMap="tableFileResultMap">
- select * from m_table_file where is_deleted = 0
- </select>
- <select id="selectTableFileList" resultMap="TableFileVO">
- select *,domain_url as url from m_table_file where is_deleted = 0 and type=2 and tab_id = #{pKid}
- </select>
- <select id="getAllFileByIds" resultType="org.springblade.manager.entity.TableFile">
- SELECT mtf.* from m_table_file mtf WHERE is_deleted = 0 and classify = #{classify} and type = 2 and tab_id in
- <foreach collection="ids" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </select>
- <delete id="delDataById">
- delete from m_table_file where id= #{id}
- <if test="recordId != null and recordId != ''">
- and trial_record_id = #{recordId}
- </if>
- </delete>
- <select id="selectTableFileListByTen" resultMap="TableFileVO">
- select *,domain_url as url from m_table_file where is_deleted = 0 and classify = #{classify} and type in (10,11,12,20,21,22) and tab_id = #{pKid}
- </select>
- <select id="selectTableFileList1" resultMap="TableFileVO">
- select *,domain_url as url from m_table_file where is_deleted = 0 and (type=20 or type=21 or type=22) and tab_id = #{pKid}
- </select>
- </mapper>
|