|
@@ -39,6 +39,41 @@
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectFileList" parameterType="DocRecent" resultMap="DocRecentResult">
|
|
|
+ SELECT a.*, b.FILE_NAME NAME
|
|
|
+ FROM (SELECT A.IS_FOLDER,
|
|
|
+ A.RELA_ID,
|
|
|
+ A.OWNER,
|
|
|
+ MAX(A.CREATE_TIME) create_time
|
|
|
+ FROM doc_recent A
|
|
|
+ GROUP BY A.IS_FOLDER,
|
|
|
+ A.RELA_ID,
|
|
|
+ A.OWNER) a,DOC_INFO b
|
|
|
+ <where>
|
|
|
+ A.RELA_ID = B.DOC_ID
|
|
|
+ <if test="isFolder != null and isFolder != ''">and IS_FOLDER = #{isFolder}</if>
|
|
|
+ <if test="owner != null and owner != ''">and OWNER = #{owner}</if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+ <select id="selectFolderList" parameterType="DocRecent" resultMap="DocRecentResult">
|
|
|
+ SELECT a.*, B.DIR_NAME NAME
|
|
|
+ FROM (SELECT A.IS_FOLDER,
|
|
|
+ A.RELA_ID,
|
|
|
+ A.OWNER,
|
|
|
+ MAX(A.CREATE_TIME) create_time
|
|
|
+ FROM doc_recent A
|
|
|
+ GROUP BY A.IS_FOLDER,
|
|
|
+ A.RELA_ID,
|
|
|
+ A.OWNER) a,DOC_DIR B
|
|
|
+ <where>
|
|
|
+ A.RELA_ID = B.DIR_ID
|
|
|
+ <if test="isFolder != null and isFolder != ''">and IS_FOLDER = #{isFolder}</if>
|
|
|
+ <if test="owner != null and owner != ''">and OWNER = #{owner}</if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectDocRecentByRecentId" parameterType="Long" resultMap="DocRecentResult">
|
|
|
<include refid="selectDocRecentVo"/>
|
|
|
where RECENT_ID = #{recentId}
|