fix:算例结果数据上传
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.sdm.common.entity.req.data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BaseReq {
|
||||
@Schema(description = "当前页码")
|
||||
@NotNull(message = "当前页码不能为空")
|
||||
private Integer current;
|
||||
|
||||
@Schema(description = "每页显示数量")
|
||||
@NotNull(message = "每页显示数量不能为空")
|
||||
private Integer size;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.sdm.common.entity.req.data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "查询文件夹内容请求参数")
|
||||
public class QueryDirReq extends BaseReq {
|
||||
// @NotBlank(message = "parentPath不能为空")
|
||||
@Schema(description = "父路径")
|
||||
private String parentPath;
|
||||
|
||||
// @NotBlank(message = "fileName不能为空")
|
||||
@Schema(description = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
@Schema(description = "上传用户ID")
|
||||
private Long uploadUserId;
|
||||
|
||||
// 1项目,2阶段,3学科,4学科下文件列表
|
||||
@Schema(description = "类型: 1项目, 2阶段, 3学科, 4学科下文件列表", defaultValue = "0")
|
||||
private Integer type = 0;
|
||||
|
||||
// 0 默认不过滤空文件夹,1 过滤
|
||||
@Schema(description = "是否过滤空文件夹: 0默认不过滤, 1过滤", defaultValue = "0")
|
||||
private Integer isFilter = 0;
|
||||
|
||||
/**
|
||||
* 文件夹ID
|
||||
*/
|
||||
@Schema(description = "文件夹ID")
|
||||
Long fileId;
|
||||
|
||||
/**
|
||||
* 节点uuid
|
||||
*/
|
||||
@Schema(description = "节点ID")
|
||||
String uuid;
|
||||
|
||||
// 查询文件或文件夹
|
||||
@Schema(description = "查询文件或文件夹: 1-文件夹,2-文件 不传查询全部 DataType ")
|
||||
Integer queryTarget =null;
|
||||
|
||||
/**
|
||||
* 项目节点id
|
||||
*/
|
||||
@Schema(description = "项目id")
|
||||
String projectId;
|
||||
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.sdm.common.feign.impl.data;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.data.CreateDirReq;
|
||||
import com.sdm.common.entity.req.data.DelDirReq;
|
||||
import com.sdm.common.entity.req.data.RenameDirReq;
|
||||
import com.sdm.common.entity.req.data.UploadFilesReq;
|
||||
import com.sdm.common.entity.req.data.*;
|
||||
import com.sdm.common.entity.req.system.LaunchApproveReq;
|
||||
import com.sdm.common.entity.resp.data.FileMetadataInfoResp;
|
||||
import com.sdm.common.feign.inter.data.IDataFeignClient;
|
||||
@@ -44,6 +41,19 @@ public class DataClientFeignClientImpl implements IDataFeignClient {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse queryDir(QueryDirReq req) {
|
||||
SdmResponse response;
|
||||
try {
|
||||
response = dataClient.queryDir(req);
|
||||
log.info("创建文响应件夹:"+ response);
|
||||
return response;
|
||||
} catch (Exception e) {
|
||||
log.error("创建文件夹失败", e);
|
||||
return SdmResponse.failed("创建文件夹失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse renameDirNew(RenameDirReq req) {
|
||||
SdmResponse response;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
package com.sdm.common.feign.inter.data;
|
||||
|
||||
import com.sdm.common.common.SdmResponse;
|
||||
import com.sdm.common.entity.req.data.CreateDirReq;
|
||||
import com.sdm.common.entity.req.data.DelDirReq;
|
||||
import com.sdm.common.entity.req.data.RenameDirReq;
|
||||
import com.sdm.common.entity.req.data.UploadFilesReq;
|
||||
import com.sdm.common.entity.req.data.*;
|
||||
import com.sdm.common.entity.req.system.LaunchApproveReq;
|
||||
import com.sdm.common.entity.resp.data.FileMetadataInfoResp;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -27,6 +24,9 @@ public interface IDataFeignClient {
|
||||
@PostMapping("/data/createDir")
|
||||
SdmResponse createDir(@RequestBody @Validated CreateDirReq req);
|
||||
|
||||
@PostMapping("/data/queryDir")
|
||||
SdmResponse queryDir(@RequestBody @Validated QueryDirReq req);
|
||||
|
||||
@PostMapping("/data/renameDirNew")
|
||||
SdmResponse renameDirNew(@RequestBody @Validated RenameDirReq req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user