mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-01 22:53:29 +08:00
去掉文件和文件对象最后修改时间字段
This commit is contained in:
@@ -186,7 +186,6 @@ public class FileController extends BaseController {
|
||||
FileVO fileVO = new FileVO();
|
||||
BeanUtils.copyProperties(fileModel, fileVO);
|
||||
fileVO.setFileCreateAt(fileModel.getFileCreateAt().getTime());
|
||||
fileVO.setFileModifiedAt(fileModel.getFileModifiedAt().getTime());
|
||||
return fileVO;
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,4 @@ public class FileObjectVO {
|
||||
|
||||
// 文件提取码
|
||||
String fileShareCode;
|
||||
|
||||
// 文件最后修改时间戳
|
||||
Long lastModified;
|
||||
}
|
||||
|
@@ -37,7 +37,4 @@ public class FileVO {
|
||||
|
||||
// 文件创建时间
|
||||
long fileCreateAt;
|
||||
|
||||
// 文件修改时间
|
||||
long fileModifiedAt;
|
||||
}
|
||||
|
@@ -102,15 +102,6 @@ public class FileDO {
|
||||
*/
|
||||
private Date fileCreateAt;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column file_info.file_modified_at
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date fileModifiedAt;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column file_info.id
|
||||
@@ -374,28 +365,4 @@ public class FileDO {
|
||||
public void setFileCreateAt(Date fileCreateAt) {
|
||||
this.fileCreateAt = fileCreateAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column file_info.file_modified_at
|
||||
*
|
||||
* @return the value of file_info.file_modified_at
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Date getFileModifiedAt() {
|
||||
return fileModifiedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column file_info.file_modified_at
|
||||
*
|
||||
* @param fileModifiedAt the value for file_info.file_modified_at
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setFileModifiedAt(Date fileModifiedAt) {
|
||||
this.fileModifiedAt = fileModifiedAt;
|
||||
}
|
||||
}
|
@@ -64,15 +64,6 @@ public class FileObjectDO {
|
||||
*/
|
||||
private String fileShareCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column file_object_info.last_modified
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long lastModified;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column file_object_info.id
|
||||
@@ -240,28 +231,4 @@ public class FileObjectDO {
|
||||
public void setFileShareCode(String fileShareCode) {
|
||||
this.fileShareCode = fileShareCode == null ? null : fileShareCode.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column file_object_info.last_modified
|
||||
*
|
||||
* @return the value of file_object_info.last_modified
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getLastModified() {
|
||||
return lastModified;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column file_object_info.last_modified
|
||||
*
|
||||
* @param lastModified the value for file_object_info.last_modified
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setLastModified(Long lastModified) {
|
||||
this.lastModified = lastModified;
|
||||
}
|
||||
}
|
@@ -156,13 +156,13 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
fileModel.setWatermark(false);
|
||||
fileModel.setAdvertising(false);
|
||||
|
||||
// 获取时间戳为 0 的时间 1970-01-01
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(0);
|
||||
Date time = calendar.getTime();
|
||||
calendar.setTimeInMillis(lastModified);
|
||||
fileModel.setFileCreateAt(calendar.getTime());
|
||||
|
||||
fileModel.setFileCreateAt(time);
|
||||
fileModel.setFileModifiedAt(time);
|
||||
// 获取时间戳为 0 的时间 1970-01-01 08:00:00
|
||||
// calendar.setTimeInMillis(0);
|
||||
// Date time = calendar.getTime();
|
||||
|
||||
Boolean isSuccess = fileService.addFile(fileModel);
|
||||
if (!isSuccess) {
|
||||
@@ -178,7 +178,6 @@ public class FileObjectServiceImpl implements FileObjectService {
|
||||
fileObjectModel.setStorageMedium(fileStorageMediumEnum.getStorageMediumName());
|
||||
fileObjectModel.setFilePath(filePath);
|
||||
fileObjectModel.setUploadStatus("UPLOADING");
|
||||
fileObjectModel.setLastModified(lastModified);
|
||||
|
||||
// 其余使用默认设置
|
||||
fileObjectModel.setFilePwd("");
|
||||
|
@@ -39,7 +39,4 @@ public class FileModel {
|
||||
|
||||
// 文件创建时间
|
||||
Date fileCreateAt;
|
||||
|
||||
// 文件修改时间
|
||||
Date fileModifiedAt;
|
||||
}
|
||||
|
@@ -26,7 +26,4 @@ public class FileObjectModel {
|
||||
|
||||
// 文件提取码
|
||||
String fileShareCode;
|
||||
|
||||
// 文件最后修改时间戳
|
||||
Long lastModified;
|
||||
}
|
||||
|
Reference in New Issue
Block a user