From 8ad84d2f4e4d45b86aec7cdecb684d5fd053674e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 9 Apr 2024 15:47:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AF=E4=BB=B6=E5=8C=85=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=9F=A5=E8=AF=A2=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/cm/software.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/features/cm/software.go b/features/cm/software.go index 87c3a18e..98b8fe79 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -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)