feat: SMF-CDR添加DNN搜索条件
This commit is contained in:
@@ -27,6 +27,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"`
|
||||
SortField string `json:"sortField" form:"sortField" binding:"omitempty,oneof=timestamp"` // 排序字段,填写结果字段
|
||||
|
||||
@@ -42,6 +42,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
|
||||
|
||||
Reference in New Issue
Block a user