From 900dee562954fc01c6e171c88e3642ff59344a60 Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Tue, 06 Feb 2024 14:45:54 +0800
Subject: [PATCH] sql优化
---
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/patrol/mapper/PatrolTaskMapper.xml | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/patrol/mapper/PatrolTaskMapper.xml b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/patrol/mapper/PatrolTaskMapper.xml
index 7116341..e930421 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/patrol/mapper/PatrolTaskMapper.xml
+++ b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/patrol/mapper/PatrolTaskMapper.xml
@@ -503,10 +503,10 @@
and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
</if>
<if test="vo.startTime !=null and vo.startTime !=''">
- AND DATE_FORMAT(T2.start_time,'%Y-%m-%d') >= #{vo.startTime}
+ AND T2.start_time >= #{vo.startTime}
</if>
<if test="vo.endTime !=null and vo.endTime !=''">
- AND DATE_FORMAT(T2.end_time,'%Y-%m-%d') <= #{vo.endTime}
+ AND T2.end_time <= #{vo.endTime}
</if>
<if test="vo.reservoirName !=null and vo.reservoirName !='' ">
AND T2.reservoir_name LIKE CONCAT('%',#{vo.reservoirName},'%')
@@ -523,10 +523,10 @@
and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
</if>
<if test="vo.startTime !=null and vo.startTime !=''">
- AND DATE_FORMAT(T3.start_time,'%Y-%m-%d') >= #{vo.startTime}
+ AND T3.start_time >= #{vo.startTime}
</if>
<if test="vo.endTime !=null and vo.endTime !=''">
- AND DATE_FORMAT(T3.end_time,'%Y-%m-%d') <= #{vo.endTime}
+ AND T3.end_time <= #{vo.endTime}
</if>
<if test="vo.reservoirName !=null and vo.reservoirName !='' ">
AND T3.reservoir_name LIKE CONCAT('%',#{vo.reservoirName},'%')
@@ -543,10 +543,10 @@
and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
</if>
<if test="vo.startTime !=null and vo.startTime !=''">
- AND DATE_FORMAT(T4.start_time,'%Y-%m-%d') >= #{vo.startTime}
+ AND T4.start_time >= #{vo.startTime}
</if>
<if test="vo.endTime !=null and vo.endTime !=''">
- AND DATE_FORMAT(T4.end_time,'%Y-%m-%d') <= #{vo.endTime}
+ AND T4.end_time <= #{vo.endTime}
</if>
<if test="vo.reservoirName !=null and vo.reservoirName !='' ">
AND T4.reservoir_name LIKE CONCAT('%',#{vo.reservoirName},'%')
@@ -564,10 +564,10 @@
and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
</if>
<if test="vo.startTime !=null and vo.startTime !=''">
- AND DATE_FORMAT(T1.start_time,'%Y-%m-%d') >= #{vo.startTime}
+ AND T1.start_time >= #{vo.startTime}
</if>
<if test="vo.endTime !=null and vo.endTime !=''">
- AND DATE_FORMAT(T1.end_time,'%Y-%m-%d') <= #{vo.endTime}
+ AND T1.end_time <= #{vo.endTime}
</if>
<if test="vo.reservoirName !=null and vo.reservoirName !='' ">
AND T1.reservoir_name LIKE CONCAT('%',#{vo.reservoirName},'%')
@@ -592,10 +592,10 @@
and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
</if>
<if test="vo.startTime !=null and vo.startTime !=''">
- AND DATE_FORMAT(T.start_time,'%Y-%m-%d') >= #{vo.startTime}
+ AND T.start_time >= #{vo.startTime}
</if>
<if test="vo.endTime !=null and vo.endTime !=''">
- AND DATE_FORMAT(T.end_time,'%Y-%m-%d') <= #{vo.endTime}
+ AND T.end_time <= #{vo.endTime}
</if>
<if test="vo.reservoirName !=null and vo.reservoirName !='' ">
AND T.reservoir_name LIKE CONCAT('%',#{vo.reservoirName},'%')
--
Gitblit v1.9.3