Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
TsMask
2025-01-17 16:47:19 +08:00
4 changed files with 13 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package kpi_c_report
import (
"fmt"
"net/http"
"strconv"
"strings"
"be.ems/lib/dborm"
@@ -157,7 +158,12 @@ func (k *KpiCReport) GetReport2FE(c *gin.Context) {
}
for _, k := range r.KpiValues {
report[k.KPIID] = k.Value
formatted := fmt.Sprintf("%.3f", k.Value)
formattedFloat, err := strconv.ParseFloat(formatted, 64)
if err != nil {
formattedFloat = 0
}
report[k.KPIID] = formattedFloat
}
reports = append(reports, report)
}

View File

@@ -43,6 +43,8 @@ func (s *Commont) SystemConfigInfo() map[string]string {
}
// 用户登录认证
infoMap["loginAuth"] = fmt.Sprint(config.Get("user.loginAuth"))
// 用户接口加密
infoMap["cryptoApi"] = fmt.Sprint(config.Get("user.cryptoApi"))
// 序列号
infoMap["serialNum"] = fmt.Sprint(config.Get("omc.sn"))
// 获取LOGO类型

View File

@@ -26,6 +26,7 @@ type CDREventSMFQuery struct {
RmUID string `json:"rmUID" form:"rmUID"`
RecordType string `json:"recordType" form:"recordType"` // 暂时没用到
SubscriberID string `json:"subscriberID" form:"subscriberID"`
DNN string `json:"dnn" form:"dnn"`
StartTime string `json:"startTime" form:"startTime"`
EndTime string `json:"endTime" form:"endTime"`
TenantName string `json:"tenantName" form:"tenantName"`

View File

@@ -206,6 +206,9 @@ func (r CDREventSMF) SelectByPage(querys model.CDREventSMFQuery) ([]model.CDREve
if querys.SubscriberID != "" {
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.subscriberIdentifier.subscriptionIDData') = ?", querys.SubscriberID)
}
if querys.DNN != "" {
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.pDUSessionChargingInformation.dNNID') = ?", querys.DNN)
}
// 查询结果
var total int64 = 0