1078-优化点播以及通道表结构

This commit is contained in:
648540858
2024-06-08 00:46:08 +08:00
parent 6ae623d639
commit 595d9be283
10 changed files with 85 additions and 39 deletions

View File

@@ -14,18 +14,18 @@ public interface JTChannelMapper {
"from " +
"wvp_jt_channel jc " +
"WHERE " +
"terminal_id = #{terminalId}" +
"terminal_db_id = #{terminalDbId}" +
" <if test='query != null'> AND " +
"jc.name LIKE concat('%',#{query},'%') " +
"</if> " +
"ORDER BY jc.channel_id " +
" </script>"})
List<JTChannel> getAll(@Param("terminalId") int terminalId, @Param("query") String query);
List<JTChannel> getAll(@Param("terminalDbId") int terminalDbId, @Param("query") String query);
@Update(value = {" <script>" +
"UPDATE wvp_jt_channel " +
"SET update_time=#{updateTime}" +
"<if test=\"terminalId != null\">, terminal_id=#{terminalId}</if>" +
"<if test=\"terminalDbId != null\">, terminal_db_id=#{terminalDbId}</if>" +
"<if test=\"hasAudio != null\">, has_audio=#{hasAudio}</if>" +
"<if test=\"name != null\">, name=#{name}</if>" +
"<if test=\"channelId != null\">, channel_id=#{channelId}</if>" +
@@ -34,14 +34,14 @@ public interface JTChannelMapper {
void update(JTChannel channel);
@Insert("INSERT INTO wvp_jt_channel (" +
"terminal_id,"+
"terminal_db_id,"+
"channel_id,"+
"name,"+
"has_audio,"+
"create_time,"+
"update_time"+
") VALUES (" +
"#{terminalId}," +
"#{terminalDbId}," +
"#{channelId}," +
"#{name}," +
"#{hasAudio}," +
@@ -53,4 +53,13 @@ public interface JTChannelMapper {
@Delete("delete from wvp_jt_channel where id = #{id}")
void delete(@Param("id") int id);
@Select(value = {" <script>" +
"SELECT * " +
"from " +
"wvp_jt_channel jc " +
"WHERE " +
"terminal_db_id = #{terminalDbId} and channel_id = #{channelId}" +
" </script>"})
JTChannel getChannel(@Param("terminalDbId") int terminalDbId, @Param("channelId") Integer channelId);
}