作者 tangxvhui

调整sql

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