|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
|
-<mapper namespace="cn.reghao.tnb.content.app.disk.db.mapper.DiskFileMapper">
|
|
|
|
|
|
|
+<mapper namespace="cn.reghao.tnb.file.app.zdisk.db.mapper.DiskFileMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into disk_file
|
|
insert into disk_file
|
|
|
(`channel_code`,`file_id`,`pid`,`path`,`filename`,`file_type`,`sha256sum`,`size`,`owner`)
|
|
(`channel_code`,`file_id`,`pid`,`path`,`filename`,`file_type`,`sha256sum`,`size`,`owner`)
|
|
@@ -66,7 +66,7 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findDiskQueryByPage" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findDiskQueryByPage" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
<where>
|
|
<where>
|
|
@@ -95,14 +95,14 @@
|
|
|
</where>
|
|
</where>
|
|
|
order by file_type,filename
|
|
order by file_type,filename
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findFileTypeCountByGroup" resultType="cn.reghao.tnb.content.app.disk.model.vo.DiskFileCount">
|
|
|
|
|
|
|
+ <select id="findFileTypeCountByGroup" resultType="cn.reghao.tnb.file.app.zdisk.model.vo.DiskFileCount">
|
|
|
select file,count(*) as total
|
|
select file,count(*) as total
|
|
|
from disk_file
|
|
from disk_file
|
|
|
group by file_type
|
|
group by file_type
|
|
|
order by total desc
|
|
order by total desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <select id="findByFileIds" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findByFileIds" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where deleted=0 and file_id in
|
|
where deleted=0 and file_id in
|
|
@@ -110,7 +110,7 @@
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findByParentIds" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findByParentIds" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where deleted=0 and pid in
|
|
where deleted=0 and pid in
|
|
@@ -118,12 +118,12 @@
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findRoot" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findRoot" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where file_id='0'
|
|
where file_id='0'
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findByPathPrefix" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findByPathPrefix" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where deleted=0 and file_id!=#{fileId} and `path` like concat(#{pathPrefix})
|
|
where deleted=0 and file_id!=#{fileId} and `path` like concat(#{pathPrefix})
|
|
@@ -143,7 +143,7 @@
|
|
|
)
|
|
)
|
|
|
group by sha256sum
|
|
group by sha256sum
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findSha256sumGroupByPage" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findSha256sumGroupByPage" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where deleted=0 and `owner`=#{userId} and file_type=#{fileType} and sha256sum not in (
|
|
where deleted=0 and `owner`=#{userId} and file_type=#{fileType} and sha256sum not in (
|
|
@@ -157,7 +157,7 @@
|
|
|
)
|
|
)
|
|
|
group by sha256sum
|
|
group by sha256sum
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findSha256sumGroup" resultType="cn.reghao.tnb.content.app.disk.model.po.DiskFile">
|
|
|
|
|
|
|
+ <select id="findSha256sumGroup" resultType="cn.reghao.tnb.file.app.zdisk.model.po.DiskFile">
|
|
|
select *
|
|
select *
|
|
|
from disk_file
|
|
from disk_file
|
|
|
where deleted=0 and sha256sum in
|
|
where deleted=0 and sha256sum in
|