Przeglądaj źródła

feat:添加排序

zhaohaipeng 21 godzin temu
rodzic
commit
04bccc82bb
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5 5
      monitor/supply_workflow_monitor.py

+ 5 - 5
monitor/supply_workflow_monitor.py

@@ -168,11 +168,11 @@ def supply_workflow_dashboard_stat(ts: int) -> List[Dict[str, Any]]:
                        when sw.status = 1 then '开启中'
                        when sw.status = 0 then '已关闭'
                        else '未知' end AS 状态,
-                   swt.total_cnt       AS '任务数',
-                   swt.init_cnt        AS '待处理',
-                   swt.running_cnt     AS '运行中',
-                   swt.success_cnt     AS '成功',
-                   swt.fail_success    AS '失败'
+                   IFNULL(swt.total_cnt, 0)    AS '任务数',
+                   IFNULL(swt.init_cnt, 0)     AS '待处理',
+                   IFNULL(swt.running_cnt, 0)  AS '运行中',
+                   IFNULL(swt.success_cnt, 0)  AS '成功',
+                   IFNULL(swt.fail_success, 0) AS '失败'
             FROM supply_workflow sw
                      LEFT JOIN (
                                    SELECT workflow_id,