作者 tangxvhui

调整排序

@@ -709,12 +709,12 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -709,12 +709,12 @@ func (d *TaskDao) ListTaskByHrbpV2(param ListTaskCondition) ([]ListTask, error)
709 t_task_1 as ( 709 t_task_1 as (
710 select 710 select
711 (case 711 (case
712 - when t_task.c_plan_completed_at=0 then 1 712 + when t_task.c_plan_completed_at=0 then 0
713 when t_task.c_plan_completed_at-now_time>0 then 0 713 when t_task.c_plan_completed_at-now_time>0 then 0
714 else t_task.c_plan_completed_at-now_time 714 else t_task.c_plan_completed_at-now_time
715 end) as sort_by_1, 715 end) as sort_by_1,
716 (case 716 (case
717 - when t_task.l_plan_completed_at=0 then 1 717 + when t_task.l_plan_completed_at=0 then 0
718 when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0 718 when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0
719 else t_task.l_plan_completed_at-t_task.l_real_completed_at 719 else t_task.l_plan_completed_at-t_task.l_real_completed_at
720 end) as sort_by_2, 720 end) as sort_by_2,
@@ -785,12 +785,12 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error) @@ -785,12 +785,12 @@ func (d *TaskDao) ListTaskNotHrbpV2(param ListTaskCondition) ([]ListTask, error)
785 tt_task_1 as ( 785 tt_task_1 as (
786 select 786 select
787 (case 787 (case
788 - when t_task.c_plan_completed_at=0 then 1 788 + when t_task.c_plan_completed_at=0 then 0
789 when t_task.c_plan_completed_at-now_time>0 then 0 789 when t_task.c_plan_completed_at-now_time>0 then 0
790 else t_task.c_plan_completed_at-now_time 790 else t_task.c_plan_completed_at-now_time
791 end) as sort_by_1, 791 end) as sort_by_1,
792 (case 792 (case
793 - when t_task.l_plan_completed_at=0 then 1 793 + when t_task.l_plan_completed_at=0 then 0
794 when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0 794 when t_task.l_plan_completed_at-t_task.l_real_completed_at>0 then 0
795 else t_task.l_plan_completed_at-t_task.l_real_completed_at 795 else t_task.l_plan_completed_at-t_task.l_real_completed_at
796 end) as sort_by_2, 796 end) as sort_by_2,