feat(file): 改造文件上传接口返回结构

- 将 POST /system/file/upload 接口返回结构从 string 改为 { id: string, url: string }
- id 字段以字符串形式返回 infra_file.id,避免 JavaScript 数值精度丢失问题
- 保持接口路径、方法和入参完全不变,仅修改返回格式
- 添加 GET /system/file/download 接口用于文件下载功能
- 优化 AppFileController 中的文件上传实现逻辑
- 更新 AuthConvert 和 AuthUserInfoRespVO 添加用户昵称和头像字段
- 在 CLAUDE.md 中补充鉴权通道和 HTTP 动词语义说明文档
- 在 ErrorCodeConstants.java 中添加多个项目管理和执行相关的错误码定义
- 删除执行成员相关的数据库表和接口定义(执行协办人替代方案)
- 在 FileMapper 中增加按 URL 查询文件的方法支持
This commit is contained in:
2026-05-12 21:18:42 +08:00
parent 4f6b209c3d
commit 220dec9b6c
98 changed files with 4138 additions and 1362 deletions

View File

@@ -0,0 +1,24 @@
package com.njcn.rdms.module.system.api.file;
import com.njcn.rdms.framework.common.pojo.CommonResult;
import com.njcn.rdms.module.system.api.file.dto.FileRespDTO;
import com.njcn.rdms.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 文件")
public interface FileApi {
String PREFIX = ApiConstants.PREFIX + "/file";
@GetMapping(PREFIX + "/get-by-url")
@Operation(summary = "通过文件 URL 查询文件")
@Parameter(name = "url", description = "文件 URL", required = true)
CommonResult<FileRespDTO> getFileByUrl(@RequestParam("url") String url);
}

View File

@@ -0,0 +1,38 @@
package com.njcn.rdms.module.system.api.file.dto;
import lombok.Data;
@Data
public class FileRespDTO {
/**
* 文件编号。
*/
private Long id;
/**
* 文件名称。
*/
private String name;
/**
* 文件路径。
*/
private String path;
/**
* 文件 URL。
*/
private String url;
/**
* 文件类型。
*/
private String type;
/**
* 文件大小。
*/
private Long size;
}