作者 tangxvhui

调整sql

@@ -291,8 +291,8 @@ func (d *TaskDao) CountTaskAnomalyNotHrbp(param ListTaskCondition) (int, error) @@ -291,8 +291,8 @@ func (d *TaskDao) CountTaskAnomalyNotHrbp(param ListTaskCondition) (int, error)
291 from task 291 from task
292 join t_task_1 on task.id =t_task_1.id 292 join t_task_1 on task.id =t_task_1.id
293 where 1=1 293 where 1=1
294 - and task.anomaly>0 and task.deleted_at isnull `  
295 - condition := []interface{}{} 294 + and task.anomaly>0 and company_id=? and task.deleted_at isnull `
  295 + condition := []interface{}{param.CompanyId}
296 whereSql := `` 296 whereSql := ``
297 if param.OnlyMy { 297 if param.OnlyMy {
298 condition = append(condition, param.UserId) 298 condition = append(condition, param.UserId)
@@ -317,7 +317,7 @@ func (d *TaskDao) CountTaskAnomalyByHrbp(param ListTaskCondition) (int, error) { @@ -317,7 +317,7 @@ func (d *TaskDao) CountTaskAnomalyByHrbp(param ListTaskCondition) (int, error) {
317 )select count(*) 317 )select count(*)
318 from task 318 from task
319 left join t_task_ignore on t_task_ignore.task_id=task.id 319 left join t_task_ignore on t_task_ignore.task_id=task.id
320 - where 1=1 and task.anomaly>0 and task.company_id=? and task.deleted_at isnull` 320 + where 1=1 and task.anomaly>0 and task.company_id=? and t_task_ignore.id isnull and task.deleted_at isnull`
321 condition := []interface{}{param.UserId, param.CompanyId} 321 condition := []interface{}{param.UserId, param.CompanyId}
322 whereSql := `` 322 whereSql := ``
323 if param.OnlyMy { 323 if param.OnlyMy {