修复更新推流状态sql错误

This commit is contained in:
648540858
2022-07-19 14:27:30 +08:00
parent 03864ae46f
commit 28b5cc39d0
4 changed files with 9 additions and 11 deletions

View File

@@ -125,16 +125,16 @@ public interface StreamPushMapper {
"where sp.status = 1 and (gs.app, gs.stream) in (" +
"<foreach collection='offlineStreams' item='item' separator=','>" +
"(#{item.app}, #{item.stream}) " +
")</foreach>" +
"</script>")
"</foreach>" +
")</script>")
List<GbStream> getOnlinePusherForGbInList(List<StreamPushItemFromRedis> offlineStreams);
@Update("<script> "+
"UPDATE stream_push SET status=0 where (app, stream) in (" +
"<foreach collection='offlineStreams' item='item' separator=','>" +
"(#{item.app}, #{item.stream}) " +
")</foreach>" +
"</script>")
"</foreach>" +
")</script>")
void offline(List<StreamPushItemFromRedis> offlineStreams);
@Select("<script> "+
@@ -150,8 +150,8 @@ public interface StreamPushMapper {
"UPDATE stream_push SET status=1 where (app, stream) in (" +
"<foreach collection='onlineStreams' item='item' separator=','>" +
"(#{item.app}, #{item.stream}) " +
")</foreach>" +
"</script>")
"</foreach>" +
")</script>")
void online(List<StreamPushItemFromRedis> onlineStreams);
@Select("SELECT gs.* FROM stream_push sp left join gb_stream gs on sp.app = gs.app AND sp.stream = gs.stream where sp.status = 1")