1.回收站功能前后端实现

2.文件管理前后端实现
3.样式未调整、功能初步测试通过
This commit is contained in:
Sh1yu
2023-10-24 15:41:26 +08:00
parent b25e0cd03b
commit f99b278e51
17 changed files with 609 additions and 222 deletions

View File

@@ -2,9 +2,13 @@ package com.zyplayer.doc.data.repository.manage.mapper;
import com.zyplayer.doc.data.repository.manage.entity.WikiPageFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zyplayer.doc.data.repository.manage.param.PageFileQueryParam;
import com.zyplayer.doc.data.repository.manage.vo.WikiPageFileInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* <p>
* Mapper 接口
@@ -14,7 +18,11 @@ import org.apache.ibatis.annotations.Update;
* @since 2019-03-06
*/
public interface WikiPageFileMapper extends BaseMapper<WikiPageFile> {
@Update("update wiki_page_file set download_num=download_num+1 where id=#{id}")
void addDownloadNum(@Param("id") Long id);
List<WikiPageFileInfoVo> getFileInfosVo(PageFileQueryParam pageFileQueryParam);
Long getFileInfoCount(PageFileQueryParam pageFileQueryParam);
}

View File

@@ -0,0 +1,13 @@
package com.zyplayer.doc.data.repository.manage.param;
import lombok.Data;
@Data
public class PageFileQueryParam {
private String name;
private String status;
private String file;
private String type;
private int pageSize;
private int current;
}

View File

@@ -0,0 +1,25 @@
package com.zyplayer.doc.data.repository.manage.vo;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* 文件相关信息
*
* @author sh1yu
* @since 2023-10-17
*/
@Data
public class WikiPageFileInfoVo {
private String id;
private String name;
private String size;
private String uuid;
private String user;
private Date time ;
private String status;
private String type;
private String file;
}

View File

@@ -1,5 +1,64 @@
<?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.zyplayer.doc.data.repository.manage.mapper.WikiPageFileMapper">
<select id="getFileInfosVo" resultType="com.zyplayer.doc.data.repository.manage.vo.WikiPageFileInfoVo">
SELECT a.id as id,
a.file_name as name,
a.file_size as size,
a.uuid as uuid,
a.create_user_name as user,
a.create_time as time ,
a.del_flag as status,
a.file_source as type,
b.del_flag as file
from wiki_page_file a left JOIN wiki_page b on a.page_id = b.id
where a.del_flag != 2
<if test="name != null and name != ''">
and (
a.file_name like #{name}
)
</if>
<if test="status != null and status != '' and status != 9">
and (
a.del_flag = #{status}
)
</if>
<if test="file != null and file != '' and file != 9">
and (
b.del_flag = #{file}
)
</if>
<if test="type != null and type != '' and type != 0">
and (
a.file_source = #{type}
)
</if>
order by b.id
limit #{pageSize} offset #{current}
</select>
<select id="getFileInfoCount" resultType="java.lang.Long">
SELECT count(*)
from wiki_page_file a left JOIN wiki_page b on a.page_id = b.id
where a.del_flag != 2
<if test="name != null and name != ''">
and (
a.file_name like #{name}
)
</if>
<if test="status != null and status != '' and status != 9">
and (
a.del_flag = #{status}
)
</if>
<if test="file != null and file != '' and file != 9">
and (
b.del_flag = #{file}
)
</if>
<if test="type != null and type != '' and type != 0">
and (
a.file_source = #{type}
)
</if>
</select>
</mapper>