fix: missing search filter caller party and called party

This commit is contained in:
2024-10-16 11:06:32 +08:00
parent 7cdc89c3ce
commit 59382dc306

View File

@@ -83,6 +83,14 @@ func (r *CDREventSMSCImpl) SelectPage(querys model.CDREventSMSCQuery) map[string
}
params = append(params, querys.EndTime)
}
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)
}
// MySQL8支持的
// if querys.RecordType != "" {
// recordTypes := strings.Split(querys.RecordType, ",")