diff --git a/src/modules/network_element/controller/ne_license.go b/src/modules/network_element/controller/ne_license.go index 41e2dffd..92a37ba8 100644 --- a/src/modules/network_element/controller/ne_license.go +++ b/src/modules/network_element/controller/ne_license.go @@ -261,11 +261,12 @@ func (s *NeLicenseController) State(c *gin.Context) { neLicense.Status = "1" neLicense.SerialNum = fmt.Sprint(neState["sn"]) neLicense.ExpiryDate = fmt.Sprint(neState["expire"]) + } else { + neLicense.Status = "0" + // 更新授权码 code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense) neLicense.ActivationRequestCode = code neLicense.LicensePath = licensePath - } else { - neLicense.Status = "0" } // 更新授权信息