mirror of https://gitee.com/stylefeng/roses
【file】文件管理字段和sql修改
parent
04752b8641
commit
acfcef2ce8
|
@ -86,6 +86,11 @@ public class SysFileInfoRequest extends BaseRequest {
|
|||
*/
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 文件应用编码
|
||||
*/
|
||||
private String fileAppCode;
|
||||
|
||||
/**
|
||||
* 版本回退
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,21 @@ public class SysFileInfoListResponse implements Serializable {
|
|||
*/
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 文件编码
|
||||
* <p>
|
||||
* 解决一个文件多个版本问题,多次上传文件编码不变
|
||||
* <p>
|
||||
* 版本号升级的依据,code相同id不同视为同一个文件的不同版本
|
||||
*/
|
||||
private Long fileCode;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为机密文件
|
||||
*/
|
||||
private String secretFlag;
|
||||
|
||||
/**
|
||||
* 文件应用Code名称
|
||||
*/
|
||||
|
@ -30,6 +45,12 @@ public class SysFileInfoListResponse implements Serializable {
|
|||
*/
|
||||
private String fileOriginName;
|
||||
|
||||
|
||||
/**
|
||||
* 文件存储位置:1-阿里云,2-腾讯云,3-minio,4-本地
|
||||
*/
|
||||
private Integer fileLocation;
|
||||
|
||||
/**
|
||||
* 文件后缀
|
||||
*/
|
||||
|
|
|
@ -107,4 +107,13 @@ public class SysFileInfo extends BaseEntity {
|
|||
@TableField("del_flag")
|
||||
private String delFlag;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 文件应用Code名称
|
||||
*/
|
||||
@TableField(value = "file_app_code")
|
||||
private String fileAppCodeName;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,27 +28,27 @@
|
|||
<!-- 附件列表 -->
|
||||
<select id="fileInfoList" resultType="cn.stylefeng.roses.kernel.file.pojo.response.SysFileInfoListResponse">
|
||||
SELECT file.file_id AS fileId,
|
||||
file.file_app_code AS fileAppCode,
|
||||
app.app_name AS fileAppCodeName,
|
||||
file.file_origin_name AS fileOriginName,
|
||||
file.file_suffix AS fileSuffix,
|
||||
file.file_size_info AS fileSizeInfo,
|
||||
file.file_version AS fileVersion,
|
||||
file.create_account_id AS createAccountId,
|
||||
file.create_dept_id AS createDeptId,
|
||||
emp.emp_full_name_cn AS createUserName,
|
||||
file.create_time AS createTime,
|
||||
file.del_flag AS delFlag
|
||||
file.file_code AS fileCode,
|
||||
file.file_app_code AS fileAppCode,
|
||||
file.secret_flag AS secretFlag,
|
||||
app.app_name AS fileAppCodeName,
|
||||
file.file_location AS fileLocation,
|
||||
file.file_origin_name AS fileOriginName,
|
||||
file.file_suffix AS fileSuffix,
|
||||
file.file_size_info AS fileSizeInfo,
|
||||
file.file_version AS fileVersion,
|
||||
user.real_name AS createUserName,
|
||||
file.create_time AS createTime,
|
||||
file.del_flag AS delFlag
|
||||
FROM sys_file_info file
|
||||
LEFT JOIN sys_app app ON file.file_app_code = app.app_code
|
||||
LEFT JOIN sys_account account ON account.account_id = file.create_account_id
|
||||
LEFT JOIN hr_emp_main emp ON account.emp_main_id = emp.emp_main_id
|
||||
LEFT JOIN sys_app app ON file.file_app_code = app.app_code
|
||||
LEFT JOIN sys_user user ON user.user_id = file.create_user
|
||||
<where>
|
||||
<if test="sysFileInfoRequest.fileAppCode != null and sysFileInfoRequest.fileAppCode != '' ">
|
||||
AND file.file_app_code = #{sysFileInfoRequest.fileAppCode}
|
||||
</if>
|
||||
<if test="sysFileInfoRequest.fileOriginName != null and sysFileInfoRequest.fileOriginName != '' ">
|
||||
AND file.file_app_code LIKE CONCAT('%',#{fileOriginName},'%')
|
||||
AND file.file_origin_name LIKE CONCAT('%',#{sysFileInfoRequest.fileOriginName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue