From f14c50cb0036d3ddd655ce4e34732ba396a836c4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:42:03 +0800
Subject: [PATCH] optimize 统计
---
java110-db/src/main/resources/mapper/store/ClassesTimeV1ServiceDaoImplMapper.xml | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/store/ClassesTimeV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/store/ClassesTimeV1ServiceDaoImplMapper.xml
index 5a53303..46d9724 100644
--- a/java110-db/src/main/resources/mapper/store/ClassesTimeV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/store/ClassesTimeV1ServiceDaoImplMapper.xml
@@ -24,6 +24,13 @@
<if test="classesId !=null and classesId != ''">
and t.classes_id= #{classesId}
</if>
+ <if test="classesIds !=null">
+ and t.classes_id in
+ <foreach collection="classesIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
+
<if test="timeId !=null and timeId != ''">
and t.time_id= #{timeId}
</if>
@@ -72,8 +79,11 @@
select count(1) count
from classes_time t
where 1 =1
- <if test="classesId !=null and classesId != ''">
- and t.classes_id= #{classesId}
+ <if test="classesIds !=null">
+ and t.classes_id in
+ <foreach collection="classesIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
</if>
<if test="timeId !=null and timeId != ''">
and t.time_id= #{timeId}
--
Gitblit v1.8.0