feat: IMS用户话单支持号码查询

This commit is contained in:
TsMask
2024-05-17 18:03:48 +08:00
parent ae524f62d9
commit 76cdd34a7d
2 changed files with 20 additions and 14 deletions

View File

@@ -63,10 +63,6 @@ func (r *CDREventImpl) SelectPage(querys model.CDREventQuery) map[string]any {
conditions = append(conditions, "rm_uid = ?")
params = append(params, querys.RmUID)
}
if querys.RmUID != "" {
conditions = append(conditions, "rm_uid = ?")
params = append(params, querys.RmUID)
}
if querys.StartTime != "" {
conditions = append(conditions, "timestamp >= ?")
beginDate := date.ParseStrToDate(querys.StartTime, date.YYYY_MM_DD_HH_MM_SS)
@@ -77,6 +73,14 @@ func (r *CDREventImpl) SelectPage(querys model.CDREventQuery) map[string]any {
endDate := date.ParseStrToDate(querys.EndTime, date.YYYY_MM_DD_HH_MM_SS)
params = append(params, endDate.Unix())
}
if querys.CallerParty != "" {
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.callerParty') = ?")
params = append(params, querys.CallerParty)
}
if querys.CalledParty != "" {
conditions = append(conditions, "JSON_EXTRACT(cdr_json, '$.calledParty') = ?")
params = append(params, querys.CalledParty)
}
if querys.RecordType != "" {
recordTypes := strings.Split(querys.RecordType, ",")
placeholder := repo.KeyPlaceholderByQuery(len(recordTypes))