fix: 数据库表变更

This commit is contained in:
TsMask
2024-04-12 17:25:43 +08:00
parent 608d726e54
commit b0e3825dd1
6 changed files with 76 additions and 65 deletions

View File

@@ -608,7 +608,7 @@ func DistributeSoftwareToNF(w http.ResponseWriter, r *http.Request) {
Version: (*neSoftware)[0]["version"],
FilePath: fmt.Sprintf("%s/software/%s/%s", config.GetYamlConfig().NE.OmcDir, neTypeLower, fileName),
PreVersion: (*neVersion)[0]["version"],
PreFile: (*neVersion)[0]["file_path"],
PreFile: (*neVersion)[0]["path"],
Status: SoftwareStatusInactive,
}
@@ -692,7 +692,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
log.Trace("neVersion:", neVersion)
if !config.GetYamlConfig().OMC.TestMode {
filePath := (*neVersion)[0]["file_path"]
filePath := (*neVersion)[0]["path"]
sshHost := fmt.Sprintf("%s@%s", config.GetYamlConfig().NE.User, neInfo.Ip)
srcFile := fmt.Sprintf("%s/actpkg.sh", config.GetYamlConfig().OMC.BinDir)
@@ -916,7 +916,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) {
PreVersion: "-",
PreFile: "-",
NewVersion: (*neVersion)[0]["version"],
NewFile: (*neVersion)[0]["file_path"],
NewFile: (*neVersion)[0]["path"],
Status: SoftwareStatusActive,
}
@@ -1018,7 +1018,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) {
PreVersion: "-",
PreFile: "-",
NewVersion: (*neVersion)[0]["version"],
NewFile: (*neVersion)[0]["file_path"],
NewFile: (*neVersion)[0]["path"],
Status: SoftwareStatusActive,
}