From 016aa105789fca71e86cdbb0d26a181812f200f9 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: 星期三, 10 七月 2024 15:33:36 +0800
Subject: [PATCH] 优化:流媒体同步任务

---
 ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml b/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml
index 1286241..88139de 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml
@@ -126,4 +126,38 @@
     <select id="selectArdTankLockTotal" resultType="java.lang.Long">
         select count(distinct atl.car_id) from ard_tank_lock atl
     </select>
+
+    <select id="getLockByCarIdList" resultType="com.ruoyi.sy.domain.ArdTankLock" >
+        select * from ard_tank_lock atl where car_id in
+        <foreach item="id" collection="carIdList" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+        order by atl.car_id,lock_num
+    </select>
+
+    <select id="selectArdTankLockAllTotal" resultType="java.lang.Long">
+        select count(*) from ard_tank_lock atl
+    </select>
+
+    <select id="selectArdTankLockTotalByCarIdList" resultType="java.lang.Long">
+        select count(*) from ard_tank_lock where car_id in
+        <foreach item="id" collection="carIdList" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+
+    <delete id="deleteArdTankLockAndWallByCarIds" >
+        delete from ard_tank_wall_lock atwl where atwl.lock_id in (
+        select atl.id from ard_tank_lock atl
+        where atl.car_id in
+        <foreach item="carId" collection="carIds" open="(" separator="," close=")">
+            #{carId}
+        </foreach>
+        );
+        delete from ard_tank_lock atl
+        where atl.car_id in
+        <foreach item="carId" collection="carIds" open="(" separator="," close=")">
+            #{carId}
+        </foreach>
+    </delete>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3