feat:重新处理七牛文件信息时间戳

This commit is contained in:
sjm
2024-07-10 15:21:12 +08:00
parent 1dbc5e1168
commit c3eb827497
2 changed files with 4 additions and 3 deletions

View File

@@ -55,7 +55,6 @@ public class SchisandraOssQiniuController {
* @description: 重命名文件 * @description: 重命名文件
* @param: [userId, bucket, oldFileName, newFileName] * @param: [userId, bucket, oldFileName, newFileName]
* @return: com.schisandra.oss.common.entity.Result * @return: com.schisandra.oss.common.entity.Result
* @author zlg
* @date: 2024/6/27 9:41 * @date: 2024/6/27 9:41
*/ */
@PostMapping("renameQiniuFile") @PostMapping("renameQiniuFile")
@@ -80,7 +79,6 @@ public class SchisandraOssQiniuController {
* @description: 拷贝文件 * @description: 拷贝文件
* @param: [userId, bucket, oldFilePath, newFilePath] * @param: [userId, bucket, oldFilePath, newFilePath]
* @return: com.schisandra.oss.common.entity.Result * @return: com.schisandra.oss.common.entity.Result
* @author zlg
* @date: 2024/6/27 9:52 * @date: 2024/6/27 9:52
*/ */
@PostMapping("copyQiniuFile") @PostMapping("copyQiniuFile")

View File

@@ -112,7 +112,10 @@ public class QiNiuOssClient implements StandardOssClient {
info.setName(item.key); info.setName(item.key);
} }
info.setCreateTime(String.valueOf(item.putTime)); String x = String.valueOf(item.putTime).substring(0, 10);
long y = Long.parseLong(x)*1000;
String result = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(y));
info.setCreateTime(result);
System.out.println(item.key); System.out.println(item.key);
infos.add(info); infos.add(info);
} }