Compare commits
No commits in common. "90bed7d0b06536df6fa2cdc92293d1578d265f70" and "387b3a0e6862af2a8eddbcb96c8819f70a8c6561" have entirely different histories.
90bed7d0b0
...
387b3a0e68
|
@ -3,7 +3,6 @@ package com.mcwl.web.controller.resource;
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.utils.obs.ObsUtils;
|
import com.mcwl.common.utils.obs.ObsUtils;
|
||||||
import com.mcwl.resource.domain.request.RequestFile;
|
|
||||||
import com.mcwl.resource.service.impl.FileServiceImpl;
|
import com.mcwl.resource.service.impl.FileServiceImpl;
|
||||||
import com.mcwl.web.controller.common.OssUtil;
|
import com.mcwl.web.controller.common.OssUtil;
|
||||||
import com.obs.services.ObsClient;
|
import com.obs.services.ObsClient;
|
||||||
|
@ -322,11 +321,4 @@ public class FileController {
|
||||||
// return R.ok(key);
|
// return R.ok(key);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/updateFileData")
|
|
||||||
public R updateFileData(@RequestBody RequestFile requestFile){
|
|
||||||
|
|
||||||
return fileService.updateFileData(requestFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@ -18,8 +17,6 @@ import lombok.NoArgsConstructor;
|
||||||
* @Description TODO
|
* @Description TODO
|
||||||
* @Date:2025/1/8 19:38
|
* @Date:2025/1/8 19:38
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Builder
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
package com.mcwl.resource.domain.request;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密后文件修改
|
|
||||||
*
|
|
||||||
* @author DaiZibo
|
|
||||||
* @date 2025/3/14
|
|
||||||
* @apiNote
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class RequestFile {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 版本ID
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型
|
|
||||||
*/
|
|
||||||
private String fileType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 秘钥
|
|
||||||
*/
|
|
||||||
private String keyRate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密后文件地址
|
|
||||||
*/
|
|
||||||
private String encryptionFilePath;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密后文件key
|
|
||||||
*/
|
|
||||||
private String encryptionObjectKey;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密后文件大小
|
|
||||||
*/
|
|
||||||
private String encryptFileSize;
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@ package com.mcwl.resource.service;
|
||||||
|
|
||||||
import com.mcwl.common.core.domain.AjaxResult;
|
import com.mcwl.common.core.domain.AjaxResult;
|
||||||
import com.mcwl.common.core.domain.R;
|
import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.resource.domain.request.RequestFile;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DaiZibo
|
* @author DaiZibo
|
||||||
|
@ -16,6 +15,4 @@ public interface FileService {
|
||||||
AjaxResult selectFile(String name, String type);
|
AjaxResult selectFile(String name, String type);
|
||||||
|
|
||||||
R selectHash(String hashCode, Integer type);
|
R selectHash(String hashCode, Integer type);
|
||||||
|
|
||||||
R updateFileData(RequestFile requestFile);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.mcwl.common.core.domain.R;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.resource.domain.ModelVersion;
|
import com.mcwl.resource.domain.ModelVersion;
|
||||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||||
import com.mcwl.resource.domain.request.RequestFile;
|
|
||||||
import com.mcwl.resource.mapper.ModelVersionMapper;
|
import com.mcwl.resource.mapper.ModelVersionMapper;
|
||||||
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
||||||
import com.mcwl.resource.service.FileService;
|
import com.mcwl.resource.service.FileService;
|
||||||
|
@ -110,33 +109,4 @@ public class FileServiceImpl implements FileService {
|
||||||
return R.ok(1);
|
return R.ok(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public R updateFileData(RequestFile requestFile) {
|
|
||||||
|
|
||||||
//校验是否是模型
|
|
||||||
if (requestFile.getFileType().equals("model")){
|
|
||||||
|
|
||||||
//修改模型
|
|
||||||
ModelVersion modelVersion = ModelVersion.builder().id(requestFile.getId())
|
|
||||||
.keyRate(requestFile.getKeyRate())
|
|
||||||
.encryptionFilePath(requestFile.getEncryptionFilePath())
|
|
||||||
.encryptionObjectKey(requestFile.getEncryptionObjectKey()).build();
|
|
||||||
|
|
||||||
versionMapper.updateById(modelVersion);
|
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
}else {
|
|
||||||
|
|
||||||
//修改工作流
|
|
||||||
// WorkFlowVersion workFlowVersion = WorkFlowVersion.builder().id(requestFile.getId())
|
|
||||||
// .keyRate(requestFile.getKeyRate())
|
|
||||||
// .encryptionFilePath(requestFile.getEncryptionFilePath())
|
|
||||||
// .encryptionObjectKey(requestFile.getEncryptionObjectKey()).build();
|
|
||||||
//
|
|
||||||
// versionMapper.updateById(modelVersion);
|
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue