fix: cdr filter by tenant
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user