【优化】报表统计SQL优化,修复小概率情况下查询null值问题;

pull/72/head
xuxueli 3 months ago
parent 3011836e97
commit 6ed92d27da

@ -2574,7 +2574,8 @@ public void execute() {
### 7.41 版本 v3.2.1 Release Notes[规划中]
- 1、【升级】升级多项maven依赖至较新版本如 netty、groovy、spring、spring-ai、dify 等;
- 2、【修复】合并PR-2369修复脚本任务参数取值问题
- 3、【ING】底层组件移除单例写法汇总factory统一管理
- 3、【优化】报表统计SQL优化修复小概率情况下查询null值问题
- 4、【ING】底层组件移除单例写法汇总factory统一管理
### TODO LIST

@ -178,9 +178,9 @@
<select id="findLogReport" resultType="java.util.Map" >
SELECT
COUNT(handle_code) `triggerDayCount`,
SUM(CASE WHEN (trigger_code in (0, 200) and handle_code = 0) then 1 else 0 end) as `triggerDayCountRunning`,
SUM(CASE WHEN handle_code = 200 then 1 else 0 end) as `triggerDayCountSuc`
IFNULL(COUNT(handle_code),0) triggerDayCount,
IFNULL(SUM(CASE WHEN (trigger_code in (0, 200) and handle_code = 0) then 1 else 0 end),0) as triggerDayCountRunning,
IFNULL(SUM(CASE WHEN handle_code = 200 then 1 else 0 end),0) as triggerDayCountSuc
FROM xxl_job_log
WHERE trigger_time BETWEEN #{from} and #{to}
</select>

Loading…
Cancel
Save