fix: 修复IMS查询条件中的recordType参数处理,去掉多余的引号

This commit is contained in:
TsMask
2025-10-23 17:54:24 +08:00
parent 1c2a411231
commit 929869ccf8

View File

@@ -74,7 +74,7 @@ func (r CDREvent) SelectByPage(neType string, query map[string]string) ([]model.
}
case "IMS":
if v, ok := query["recordType"]; ok && v != "" {
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.recordType') = ?", fmt.Sprintf("'%s'", v))
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.recordType') = ?", v)
}
if v, ok := query["callerParty"]; ok && v != "" {
tx = tx.Where("JSON_EXTRACT(cdr_json, '$.callerParty') like ?", fmt.Sprintf("%%%s%%", v))