|
|
@@ -149,4 +149,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
+ <select id="getListByFilter" parameterType="com.siwei.apply.domain.vo.CadastreFileFilterVo" resultMap="cadastreFileMap">
|
|
|
+ SELECT <include refid="Base_Column_List"/>
|
|
|
+ FROM t_cadastre_file
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND name LIKE CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fileType != null and fileType != ''">
|
|
|
+ AND file_type = #{fileType}
|
|
|
+ </if>
|
|
|
+ <if test="uploadTime != null and uploadTime != ''">
|
|
|
+ AND to_char(upload_time, 'YYYY-MM-DD') = #{uploadTime}
|
|
|
+ </if>
|
|
|
+ <if test="readStatus != null and readStatus != ''">
|
|
|
+ AND status = #{readStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY upload_time DESC
|
|
|
+ LIMIT #{pageSize} OFFSET #{offset}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCountByFilter" parameterType="com.siwei.apply.domain.vo.CadastreFileFilterVo" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM t_cadastre_file
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND name LIKE CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fileType != null and fileType != ''">
|
|
|
+ AND file_type = #{fileType}
|
|
|
+ </if>
|
|
|
+ <if test="uploadTime != null and uploadTime != ''">
|
|
|
+ AND to_char(upload_time, 'YYYY-MM-DD') = #{uploadTime}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND status = #{status}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|