作者 tangxvhui

调整排序

... ... @@ -709,12 +709,12 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error)
t_task_1 as (
select
(case
when t_task.c_plan_completed_at=0 then 1
when t_task.c_plan_completed_at=0 then 0
when t_task.c_plan_completed_at-now_time>0 then 0
else t_task.c_plan_completed_at-now_time
end) as sort_by_1,
(case
when t_task.l_plan_completed_at=0 then 1
when t_task.l_plan_completed_at=0 then 0
when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0
else t_task.l_plan_completed_at-t_task.l_real_completed_at
end) as sort_by_2,
... ... @@ -785,12 +785,12 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
tt_task_1 as (
select
(case
when t_task.c_plan_completed_at=0 then 1
when t_task.c_plan_completed_at=0 then 0
when t_task.c_plan_completed_at-now_time>0 then 0
else t_task.c_plan_completed_at-now_time
end) as sort_by_1,
(case
when t_task.l_plan_completed_at=0 then 1
when t_task.l_plan_completed_at=0 then 0
when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0
else t_task.l_plan_completed_at-t_task.l_real_completed_at
end) as sort_by_2,
... ...