Browse Source

优化推流列表查询排序

pull/317/head
648540858 3 years ago
parent
commit
b90969f180
  1. 2
      src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushUploadFileHandler.java
  2. 2
      src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java

2
src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushUploadFileHandler.java

@ -28,7 +28,7 @@ public class StreamPushUploadFileHandler extends AnalysisEventListener<StreamPus
streamPushItem.setGbId(streamPushExcelDto.getGbId()); streamPushItem.setGbId(streamPushExcelDto.getGbId());
streamPushItem.setStatus(false); streamPushItem.setStatus(false);
streamPushItem.setStreamType("push"); streamPushItem.setStreamType("push");
streamPushItem.setCreateStamp(System.currentTimeMillis()); streamPushItem.setCreateStamp(System.currentTimeMillis()/1000);
streamPushItem.setMediaServerId(defaultMediaServerId); streamPushItem.setMediaServerId(defaultMediaServerId);
streamPushItem.setName(streamPushExcelDto.getName()); streamPushItem.setName(streamPushExcelDto.getName());
streamPushItem.setOriginType(2); streamPushItem.setOriginType(2);

2
src/main/java/com/genersoft/iot/vmp/storager/dao/StreamPushMapper.java

@ -40,7 +40,7 @@ public interface StreamPushMapper {
"</script>") "</script>")
int delAll(List<StreamPushItem> streamPushItems); int delAll(List<StreamPushItem> streamPushItems);
@Select("SELECT st.*, pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude FROM stream_push st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream") @Select("SELECT st.*, pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude FROM stream_push st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream order by st.createStamp desc")
List<StreamPushItem> selectAll(); List<StreamPushItem> selectAll();
@Select("SELECT st.*, pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude FROM stream_push st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.enable=${enable}") @Select("SELECT st.*, pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude FROM stream_push st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.enable=${enable}")

Loading…
Cancel
Save