fix: 网元授权状态检查离线时获取更新激活码
This commit is contained in:
@@ -259,11 +259,12 @@ func (s *NeLicenseController) State(c *gin.Context) {
|
|||||||
neLicense.Status = "1"
|
neLicense.Status = "1"
|
||||||
neLicense.SerialNum = fmt.Sprint(neState["sn"])
|
neLicense.SerialNum = fmt.Sprint(neState["sn"])
|
||||||
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
|
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
|
||||||
|
} else {
|
||||||
|
neLicense.Status = "0"
|
||||||
|
// 更新授权码
|
||||||
code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense)
|
code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense)
|
||||||
neLicense.ActivationRequestCode = code
|
neLicense.ActivationRequestCode = code
|
||||||
neLicense.LicensePath = licensePath
|
neLicense.LicensePath = licensePath
|
||||||
} else {
|
|
||||||
neLicense.Status = "0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新授权信息
|
// 更新授权信息
|
||||||
|
|||||||
Reference in New Issue
Block a user