fix: 网元激活申请码提取两行中的激活码

This commit is contained in:
TsMask
2025-05-29 14:50:44 +08:00
parent afe53927e5
commit d080dcd367
2 changed files with 11 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package controller
import (
"fmt"
"strings"
"github.com/gin-gonic/gin"
@@ -265,7 +266,9 @@ func (s *NeLicenseController) State(c *gin.Context) {
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
} else {
neLicense.Status = "0"
// 更新授权码
}
// 更新授权码
if neLicense.ActivationRequestCode == "" || strings.HasPrefix(neLicense.ActivationRequestCode, "SN") {
code, licensePath := s.neLicenseService.ReadLicenseInfo(neLicense)
neLicense.ActivationRequestCode = code
neLicense.LicensePath = licensePath