feat: license信息添加用户数/基站数字段记录
This commit is contained in:
1 parent
a760f8207a
commit
0f3d5ab606
8 files changed
+56
-24
No files matched your search
@@ -157,9 +157,10 @@ func (s *NeLicenseController) Code(c *gin.Context) {
|
||||
if licensePath != "" {
|
||||
neLicense.LicensePath = licensePath
|
||||
} else {
|
||||
neLicense.Capability = 0
|
||||
neLicense.SerialNum = ""
|
||||
neLicense.ExpiryDate = ""
|
||||
neLicense.UeNumber = 0
|
||||
neLicense.NbNumber = 0
|
||||
neLicense.Status = "0"
|
||||
}
|
||||
neLicense.UpdateBy = reqctx.LoginUserToUserName(c)
|
||||
@@ -261,9 +262,10 @@ func (s *NeLicenseController) State(c *gin.Context) {
|
||||
}
|
||||
if neState, err := neFetchlink.NeState(neInfo); err == nil && neState["sn"] != nil {
|
||||
neLicense.Status = "1"
|
||||
neLicense.Capability = parse.Number(neState["capability"])
|
||||
neLicense.SerialNum = fmt.Sprint(neState["sn"])
|
||||
neLicense.ExpiryDate = fmt.Sprint(neState["expire"])
|
||||
neLicense.UeNumber = parse.Number(neState["ueNumber"])
|
||||
neLicense.NbNumber = parse.Number(neState["nbNumber"])
|
||||
} else {
|
||||
neLicense.Status = "0"
|
||||
}
|
||||
@@ -280,9 +282,10 @@ func (s *NeLicenseController) State(c *gin.Context) {
|
||||
|
||||
if neLicense.Status == "1" {
|
||||
c.JSON(200, resp.OkData(map[string]any{
|
||||
"capability": neLicense.Capability,
|
||||
"sn": neLicense.SerialNum,
|
||||
"expire": neLicense.ExpiryDate,
|
||||
"sn": neLicense.SerialNum,
|
||||
"expire": neLicense.ExpiryDate,
|
||||
"ueNumber": neLicense.UeNumber,
|
||||
"nbNumber": neLicense.NbNumber,
|
||||
}))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user