|
|
@@ -8,49 +8,49 @@
|
|
|
|
|
|
<select id="selectPageVo" parameterType="vip.xiaonuo.disk.domain.UserFile" resultType="vip.xiaonuo.disk.vo.file.FileListVO">
|
|
|
select * from userfile a
|
|
|
- left join image on a.fileId = image.fileId
|
|
|
- left join file on file.fileId = a.fileId
|
|
|
+ left join image on a.FILE_ID = image.FILE_ID
|
|
|
+ left join file on file.FILE_ID = a.FILE_ID
|
|
|
<where>
|
|
|
<if test="fileTypeId != null">
|
|
|
<choose>
|
|
|
<when test="fileTypeId != 5">
|
|
|
- extendName in (select fileExtendName from fileclassification where fileTypeId = #{fileTypeId})
|
|
|
+ EXTEND_NAME in (select FILE_EXTEND_NAME from fileclassification where FILE_TYPE_ID = #{fileTypeId})
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- extendName not in (select fileExtendName from fileclassification where fileTypeId in (1, 2, 3, 4))
|
|
|
+ EXTEND_NAME not in (select FILE_EXTEND_NAME from fileclassification where FILE_TYPE_ID in (1, 2, 3, 4))
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
- and a.isDir = 0
|
|
|
+ and a.IS_DIR = 0
|
|
|
</if>
|
|
|
<if test="userFile.userId != null">
|
|
|
- and a.userId = #{userFile.userId}
|
|
|
+ and a.USER_ID = #{userFile.userId}
|
|
|
</if>
|
|
|
<if test="userFile.filePath != null">
|
|
|
- and a.filePath = #{userFile.filePath}
|
|
|
+ and a.FILE_PATH = #{userFile.filePath}
|
|
|
</if>
|
|
|
<if test="userFile.extendName != null">
|
|
|
- and a.extendName = #{userFile.extendName}
|
|
|
+ and a.EXTEND_NAME = #{userFile.extendName}
|
|
|
</if>
|
|
|
<if test="userFile.userFileId != null">
|
|
|
- and a.userFileId = #{userFile.userFileId}
|
|
|
+ and a.USER_FILE_ID = #{userFile.userFileId}
|
|
|
</if>
|
|
|
<if test="userFile.fileName != null">
|
|
|
- and a.fileName = #{userFile.fileName}
|
|
|
+ and a.FILE_NAME = #{userFile.fileName}
|
|
|
</if>
|
|
|
- and a.deleteFlag = 0
|
|
|
+ and a.DELETE_FLAG = 0
|
|
|
</where>
|
|
|
- ORDER BY isDir desc
|
|
|
+ ORDER BY IS_DIR desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserFileByLikeRightFilePath" resultType="vip.xiaonuo.disk.domain.UserFile">
|
|
|
select * from userfile
|
|
|
- where (filePath = #{filePath} or filePath like concat(#{filePath},'/%')) and userId = #{userId} and deleteFlag = 0
|
|
|
+ where (FILE_PATH = #{filePath} or FILE_PATH like concat(#{filePath},'/%')) and USER_ID = #{userId} and DELETE_FLAG = 0
|
|
|
</select>
|
|
|
|
|
|
<select id="selectStorageSizeByUserId" resultType="java.lang.Long" parameterType="java.lang.String">
|
|
|
- SELECT SUM(fileSize) FROM userfile
|
|
|
- LEFT JOIN file ON file.fileId = userfile.fileId
|
|
|
- WHERE userfile.userId = #{userId}
|
|
|
+ SELECT SUM(FILE_SIZE) FROM userfile
|
|
|
+ LEFT JOIN file ON file.FILE_ID = userfile.FILE_ID
|
|
|
+ WHERE userfile.USER_ID = #{userId}
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|