From 8ff8b4dbccd93d4dbc7976b50148088fef77af0b Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期五, 08 十二月 2023 08:56:26 +0800
Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe

---
 hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml |   63 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml b/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml
index eae824e..51b8d7e 100644
--- a/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml
+++ b/hd/pipe/screen/src/main/resources/mapping/BigScreenMapper.xml
@@ -234,7 +234,7 @@
     </insert>
 
     <select id="queryGroups" resultType="com.thhy.screen.modules.biz.audio.entity.AudioGroup">
-        select id,group_id as groupId,group_name as groupName from t_audio_groups
+        select id,group_id as groupId,group_name as groupName from t_audio_group
     </select>
 
     <!--钢筋总消耗,周消耗,月消耗-->
@@ -272,5 +272,66 @@
         from sys_device sd where sd.produce_order = '静养'
     </select>
 
+    <insert id="insertAudioFile">
+        insert into  t_audio_group_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id !=null and id !=''">
+                id,
+            </if>
+            <if test="groupId !=null and groupId !=''">
+                group_id,
+            </if>
+            <if test="audioFile !=null and audioFile !=''">
+                audio_file,
+            </if>
+            <if test="defaults !=null">
+                `defaults`,
+            </if>
+        </trim>
+        <trim prefix=" values (" suffix=")" suffixOverrides=",">
+            <if test="id !=null and id !=''">
+                #{id},
+            </if>
+            <if test="groupId !=null and groupId !=''">
+                #{groupId},
+            </if>
+            <if test="audioFile !=null and audioFile !=''">
+                #{audioFile},
+            </if>
+            <if test="defaults !=null">
+                #{defaults},
+            </if>
+        </trim>
+    </insert>
 
+    <update id="updateAudioFile">
+        UPDATE  t_audio_group_file
+        <set>
+            <trim suffixOverrides=",">
+                <if test="groupId !=null and groupId !=''">
+                    group_id = #{groupId},
+                </if>
+                <if test="audioFile !=null and audioFile !=''">
+                    audio_file = #{groupFile},
+                </if>
+                <if test="defaults !=null">
+                    `defaults` = #{defaults},
+                </if>
+            </trim>
+        </set>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAudioFile">
+        delete from t_audio_group_file where group_id = #{groupId}
+    </delete>
+
+    <select id="queryGroupInfo" resultType="com.thhy.screen.modules.biz.audio.entity.GroupInfoVo">
+        select id,group_name as groupName
+            from t_audio_group where id = #{id}
+    </select>
+
+    <select id="queryFileByGroup" resultType="com.thhy.screen.modules.biz.audio.entity.AudioFile">
+        select id,group_id as groupId,audio_file as audioFile,`defaults` from t_audio_group_file where group_id = #{groupId}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3