From fe09fa4ed5ff5afd0c0e3d4efdbecd004e1d87d6 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 17 May 2024 18:06:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=8A=B6=E6=80=81=E5=A4=B1=E8=B4=A5=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=B8=E5=8F=AF=E8=AF=81=E5=BA=8F=E5=88=97?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/network_element/controller/ne_license.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/modules/network_element/controller/ne_license.go b/src/modules/network_element/controller/ne_license.go index 9c171e8e..d503b8db 100644 --- a/src/modules/network_element/controller/ne_license.go +++ b/src/modules/network_element/controller/ne_license.go @@ -199,19 +199,17 @@ func (s *NeLicenseController) State(c *gin.Context) { return } if neState, err := neService.NeState(neInfo); err == nil { + neLicense.Status = "1" neLicense.SerialNum = fmt.Sprint(neState["sn"]) neLicense.ExpiryDate = fmt.Sprint(neState["expire"]) - neLicense.Status = "1" + code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense) + neLicense.ActivationRequestCode = code + neLicense.LicensePath = licensePath } else { - neLicense.SerialNum = "-" - neLicense.ExpiryDate = "-" neLicense.Status = "0" } // 更新授权信息 - code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense) - neLicense.ActivationRequestCode = code - neLicense.LicensePath = licensePath neLicense.UpdateBy = ctx.LoginUserToUserName(c) s.neLicenseService.Update(neLicense)