Browse Source

修改公开模型路径测试

dev-opt-cp
chenzhihang 7 months ago
parent
commit
5ab2f21667
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

+ 3
- 3
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -1118,7 +1118,7 @@ public class ModelsServiceImpl implements ModelsService {

@Override
public ModelsVo getModelDetail(Integer id, String identifier, String owner, String version, Boolean isPublic) throws Exception {
String ci4sUsername = SecurityUtils.getLoginUser().getUsername();;
// String ci4sUsername = SecurityUtils.getLoginUser().getUsername();
// String ci4sUsername = isPublic ? Constant.Item_Public : SecurityUtils.getLoginUser().getUsername();

if (StringUtils.isEmpty(version)) {
@@ -1126,8 +1126,8 @@ public class ModelsServiceImpl implements ModelsService {
}

// git pull操作,然后读取里面的文件列表,列出每个文件的大小和名称,封装成MAP
List<Map<String, Object>> fileDetailsAfterGitPull = FileUtil.getFiles(localPath + ci4sUsername + "/model/" + id + "/" + identifier + "/" + version + "/model");
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(localPath + ci4sUsername + "/model/" + id + "/" + identifier + "/" + version + "/metadata/metadata.yaml");
List<Map<String, Object>> fileDetailsAfterGitPull = FileUtil.getFiles(localPath + owner + "/model/" + id + "/" + identifier + "/" + version + "/model");
Map<String, Object> stringObjectMap = YamlUtils.loadYamlFile(localPath + owner + "/model/" + id + "/" + identifier + "/" + version + "/metadata/metadata.yaml");

String jsonString = JSON.toJSONString(stringObjectMap);
ModelsVo modelsVo = JSON.parseObject(jsonString, ModelsVo.class);


Loading…
Cancel
Save