fix: cdr filter by tenant

This commit is contained in:
2024-10-15 16:17:32 +08:00
parent 452ba71c9e
commit 97f9fd0bb2
9 changed files with 37 additions and 37 deletions

View File

@@ -118,7 +118,7 @@ func (r *CDREventIMSImpl) SelectPage(querys model.CDREventIMSQuery) map[string]a
if err != nil {
log.Errorf("Get tenant_id from sys_user err => %v", err)
}
log.Tracef("userName=%v, tenantID=%v", querys.TenantName, tenantID)
log.Tracef("tenantName=%v, tenantID=%v", querys.TenantName, tenantID)
if tenantID != "" {
conditions = append(conditions, "c.tenant_id = ?")
params = append(params, tenantID)

View File

@@ -100,7 +100,7 @@ func (r *CDREventSMFImpl) SelectPage(querys model.CDREventSMFQuery) map[string]a
if err != nil {
log.Errorf("Get tenant_id from sys_user err => %v", err)
}
log.Tracef("userName=%v, tenantID=%v", querys.TenantName, tenantID)
log.Tracef("tenantName=%v, tenantID=%v", querys.TenantName, tenantID)
if tenantID != "" {
conditions = append(conditions, "c.tenant_id = ?")
params = append(params, tenantID)

View File

@@ -111,7 +111,7 @@ func (r *CDREventSMSCImpl) SelectPage(querys model.CDREventSMSCQuery) map[string
if err != nil {
log.Errorf("Get tenant_id from sys_user err => %v", err)
}
log.Tracef("userName=%v, tenantID=%v", querys.TenantName, tenantID)
log.Tracef("tenantName=%v, tenantID=%v", querys.TenantName, tenantID)
if tenantID != "" {
conditions = append(conditions, "c.tenant_id = ?")
params = append(params, tenantID)
@@ -142,7 +142,7 @@ func (r *CDREventSMSCImpl) SelectPage(querys model.CDREventSMSCQuery) map[string
}
// 查询数量 长度为0直接返回
totalSql := "select count(1) as 'total' from cdr_event_smsc"
totalSql := "select count(1) as 'total' from cdr_event_smsc c"
totalRows, err := datasource.RawDB("", totalSql+whereSql, params)
if err != nil {
logger.Errorf("total err => %v", err)