Browse Source

增加修改资源版本功能

dev-opt-homepage
chenzhihang 9 months ago
parent
commit
8311b6eea0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

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

@@ -870,7 +870,8 @@ public class ModelsServiceImpl implements ModelsService {
String relatePath = ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
String rootPath = localPath + relatePath;
String metaPath = rootPath + "/metadata";
YamlUtils.generateYamlFile(JsonUtils.objectToMap(modelsVo), metaPath, "metadata");
Map<String, Object> metaMap = JSON.parseObject(JSON.toJSONString(modelsVo), Map.class);
YamlUtils.generateYamlFile(metaMap, metaPath, "metadata");
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);
return "更新模型版本成功";
}


Loading…
Cancel
Save