From 77776780812cadbd661f3b929c13195e18ec18fe Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期二, 02 七月 2024 17:02:08 +0800
Subject: [PATCH] 电磁锁根据三一车辆主键修改提交

---
 ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 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 4d033cd..cba1517 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdTankLockMapper.xml
@@ -94,4 +94,32 @@
     <select id="getAll" resultMap="ArdTankLockResult">
         select * from ard_tank_lock atl order by atl.car_id
     </select>
+
+    <insert id="insertArdTankLocks" parameterType="com.ruoyi.sy.domain.ArdTankLock" >
+        insert into ard_tank_lock (id, lock_num, lock_name,
+        img_position_top, img_position_left, car_id,
+        enable, restart_state, online_time)
+        values
+        <foreach collection ="ardTankLocks" item="ardTankLock" separator =",">
+            (#{ardTankLock.id},#{ardTankLock.lockNum},#{ardTankLock.lockName},
+            #{ardTankLock.imgPositionTop},#{ardTankLock.imgPositionLeft},
+            #{ardTankLock.carId},#{ardTankLock.enable},#{ardTankLock.restartState},
+             #{ardTankLock.onlineTime})
+        </foreach >
+    </insert>
+
+    <select id="getLockByCarId" resultMap="ArdTankLockResult" parameterType="java.lang.String">
+        select * from ard_tank_lock atl where car_id = #{carId} order by atl.lock_num
+    </select>
+
+    <delete id="deleteLockByCarId" parameterType="java.lang.String">
+        delete from ard_tank_lock where car_id = #{carId}
+    </delete>
+
+    <delete id="deleteArdTankLockByIdSet" >
+        delete from ard_tank_lock where id in
+        <foreach item="id" collection="idSet" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3