123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?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.wtkj.mapper.FileAndFolderMapper">
- <select id="selectByStage" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0 and parent_id = 0 and stage_id = #{param1}
- order by type desc, is_private
- </select>
- <select id="getFileAmountByFolderId" resultType="java.lang.Integer">
- select count(id) from blade_file_and_folder where is_deleted = 0 and type = 1
- <if test="param1 != null">
- and stage_id = #{param1}
- </if>
- <if test="param2 != null">
- and parent_id = #{param2}
- </if>
- </select>
- <select id="getChildrenFolderList" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0 and type = 2
- <if test="param1 != null">
- and stage_id = #{param1}
- </if>
- <if test="param2 != null">
- and parent_id = #{param2}
- </if>
- </select>
- <select id="selectByParent" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0 and parent_id = #{param1}
- order by type desc, is_private
- </select>
- <select id="getChildrenFileList" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0 and type = 1
- <if test="param1 != null">
- and stage_id = #{param1}
- </if>
- <if test="param2 != null">
- and parent_id = #{param2}
- </if>
- </select>
- <select id="getChildren" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0
- <if test="param1 != null">
- and stage_id = #{param1}
- </if>
- <if test="param2 != null">
- and parent_id = #{param2}
- </if>
- </select>
- <select id="getPage" resultType="com.wtkj.entity.FileAndFolder">
- select * from blade_file_and_folder where is_deleted = 0 and type = 1 and project_id = #{param1}
- <if test="param2 != null">
- and stage_id = #{param2}
- </if>
- <if test="param3 != null ">
- and DATE(create_time) >=DATE_SUB(CURDATE(), INTERVAL 15 DAY)
- </if>
- order by create_time desc
- </select>
- <select id="selectFileAmountByStageId" resultType="java.lang.Integer">
- select count(id) from blade_file_and_folder where is_deleted = 0 and type = 1 and stage_id = #{param}
- </select>
- </mapper>
|