file/src/main/resources/mapper/ShareMapper.xml
马超 f74ff38c94 1、修复文件解压失败问题
2、修复新建PPT文件打开失败问题
3、新增复制文件接口
4、底层代码优化
2021-08-16 17:37:02 +08:00

36 lines
1.3 KiB
XML

<?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.qiwenshare.file.mapper.ShareMapper">
<select id="selectShareList" resultType="com.qiwenshare.file.vo.share.ShareListVO">
SELECT * FROM share a
LEFT JOIN sharefile b ON b.shareBatchNum = a.shareBatchNum
LEFT JOIN userfile c ON c.userFileId = b.userFileId
LEFT JOIN file d ON d.fileId = c.fileId
WHERE shareFilePath = #{shareFilePath}
<if test="shareBatchNum != null">
AND a.shareBatchNum = #{shareBatchNum}
</if>
AND c.userId = #{userId}
order BY shareTime desc
limit #{beginCount}, #{pageCount}
</select>
<select id="selectShareListTotalCount" resultType="java.lang.Integer">
SELECT count(*) FROM share a
LEFT JOIN sharefile b ON b.shareBatchNum = a.shareBatchNum
LEFT JOIN userfile c ON c.userFileId = b.userFileId
LEFT JOIN file d ON d.fileId = c.fileId
WHERE shareFilePath = #{shareFilePath}
<if test="shareBatchNum != null">
AND a.shareBatchNum = #{shareBatchNum}
</if>
AND c.userId = #{userId}
</select>
</mapper>