fix: 软件包上传查询是否存在相同版本号
This commit is contained in:
@@ -213,6 +213,14 @@ func UploadSoftwareMultiFile(w http.ResponseWriter, r *http.Request) {
|
||||
services.ResponseNotFound404UriNotExist(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
sql := fmt.Sprintf("select * from ne_software where ne_type='%s' and version='%s'", neTypeUpper, version)
|
||||
neSoftwareInfo, _ := dborm.XormGetDataBySQL(sql)
|
||||
if len(*neSoftwareInfo) >= 1 {
|
||||
services.ResponseInternalServerError500ProcessError(w, fmt.Errorf("ne_software version has exits"))
|
||||
return
|
||||
}
|
||||
|
||||
md5Param := services.GetUriParamString(r, "md5Sum", ",", false, false)
|
||||
|
||||
softwarePath := fmt.Sprintf("%s/%s", config.GetYamlConfig().OMC.Software, neTypeLower)
|
||||
|
||||
Reference in New Issue
Block a user