mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 03:09:19 +08:00
feat: 迁移旧媒体文件到统一文件系统 sys/file
Backend: - SysFileController 新增 deleteFile + updateFile 接口 - 新增 SysFileUpdateDTO 用于更新文件元信息 - SysFileServiceImpl 实现 deleteFile + updateFile(带 companyId 校验) Frontend: - 导入订单页面改用 batchUploadFilesApi(返回 storagePath) - 文件管理页 media/file/index.vue 改用 system/file API - uploadFileApi → batchUploadFilesApi - url → accessUrl - updateFileApi 改用 system/file - FileEditModal 改用 system/file 类型和 API 旧媒体系统 (media/file) 不再使用,待后续清理。
This commit is contained in:
+3
-3
@@ -32,7 +32,7 @@ import {
|
||||
import { createImportTaskApi } from '#/api/ecommerce/import-task';
|
||||
import { getAllOrderStatusListApi } from '#/api/ecommerce/order-status';
|
||||
import { getShopPageApi } from '#/api/ecommerce/shop';
|
||||
import { uploadFileApi } from '#/api/media/file';
|
||||
import { batchUploadFilesApi } from '#/api/system/file';
|
||||
import { useImportTaskStore } from '#/store';
|
||||
|
||||
// 定义映射项数据结构
|
||||
@@ -759,7 +759,7 @@ const handleCreateTask = async () => {
|
||||
|
||||
// 先上传文件
|
||||
message.loading('正在上传文件...', 0);
|
||||
const fileInfo = await uploadFileApi(selectedFile.value);
|
||||
const [fileInfo] = await batchUploadFilesApi([selectedFile.value]);
|
||||
message.destroy();
|
||||
|
||||
// 构建字段映射 JSON(基于 ImportFieldDefInfoVO 结构)
|
||||
@@ -790,7 +790,7 @@ const handleCreateTask = async () => {
|
||||
shopId: selectedShopId.value!,
|
||||
type: 'order',
|
||||
fileName: selectedFile.value.name,
|
||||
filePath: fileInfo.url,
|
||||
filePath: fileInfo.storagePath,
|
||||
mapping: JSON.stringify(fullMapping),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user