From 72359f3c9e9fe855ecafafb769ed52fc2a7f7e61 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: 星期六, 10 八月 2024 09:46:02 +0800
Subject: [PATCH] 优化:视频通话会话列表和详情获取最后一条消息中增加用户名称和头像

---
 ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml b/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
index 19c8ba2..52db00a 100644
--- a/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
+++ b/ard-work/src/main/resources/mapper/sy/ArdSyCarMapper.xml
@@ -163,7 +163,7 @@
             #{deptId}
         </foreach>
     </select>
-    <select id="selectArdSyCarAndTankLockByUserId" resultMap="ArdSyCarLockResult">
+    <select id="selectArdSyCarAndTankLockByUserId" resultMap="ArdSyCarLockResult" parameterType="java.lang.String">
         select "asc".id,"asc".car_id,"asc".car_model,"asc".car_type,
         "asc".car_brand,"asc".dept_id,"asc".car_picture,atl.id as lid,
         atl.lock_num,atl.lock_name,atl.img_position_top,atl.img_position_left,
@@ -180,4 +180,21 @@
         )
         select dept_id from rsd) order by "asc".car_id desc,atl.lock_num
     </select>
+    <select id="selectByBrandAndType" resultMap="ArdSyCarResult" parameterType="java.lang.String">
+        select * from ard_sy_car
+        <where>
+            <if test="carType != null  and carType != ''"> and car_type = #{carType}</if>
+            <if test="carBrand != null  and carBrand != ''"> and car_brand = #{carBrand}</if>
+        </where>
+    </select>
+    <select id="selectArdSyCarAndTankLock" resultMap="ArdSyCarLockResult" >
+       select "asc".id,"asc".car_id,"asc".car_model,"asc".car_type,
+       "asc".car_brand,"asc".dept_id,"asc".car_picture,atl.id as lid,
+       atl.lock_num,atl.lock_name,atl.img_position_top,atl.img_position_left,
+       atl.car_id as lcar_id,atl.enable,coalesce(atl.restart_state,'') as restart_state,
+       coalesce(atl.online_time,'') as online_time
+       from ard_sy_car "asc"
+       inner join ard_tank_lock atl on "asc".car_id = atl.car_id
+       order by "asc".car_id desc,atl.lock_num
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3