修改排序

2.7.2
648540858 2024-06-19 16:00:26 +08:00
parent 107caf1171
commit f5abf8df4c
2 changed files with 25 additions and 9 deletions

View File

@ -53,7 +53,7 @@ public interface CloudRecordServiceMapper {
" <if test= 'ids != null ' > and id in " +
" <foreach collection='ids' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
" </if>" +
" order by start_time DESC" +
" order by start_time ASC" +
" </script>")
List<CloudRecordItem> getList(@Param("query") String query, @Param("app") String app, @Param("stream") String stream,
@Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,

View File

@ -120,22 +120,38 @@ public class ApiStreamController {
if (errorCode == InviteErrorCode.SUCCESS.getCode()) {
if (data != null) {
StreamInfo streamInfo = (StreamInfo)data;
if (streamInfo.getTranscodeStream() != null) {
streamInfo = streamInfo.getTranscodeStream();
}
JSONObject resultJjson = new JSONObject();
resultJjson.put("StreamID", streamInfo.getStream());
resultJjson.put("DeviceID", serial);
resultJjson.put("ChannelID", code);
resultJjson.put("ChannelName", deviceChannel.getName());
resultJjson.put("ChannelCustomName", "");
resultJjson.put("FLV", streamInfo.getFlv().getUrl());
if(streamInfo.getHttps_flv() != null) {
resultJjson.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl());
if (streamInfo.getTranscodeStream() != null) {
resultJjson.put("FLV", streamInfo.getTranscodeStream().getFlv().getUrl());
}else {
resultJjson.put("FLV", streamInfo.getFlv().getUrl());
}
resultJjson.put("WS_FLV", streamInfo.getWs_flv().getUrl());
if(streamInfo.getHttps_flv() != null) {
if (streamInfo.getTranscodeStream() != null) {
resultJjson.put("HTTPS_FLV", streamInfo.getTranscodeStream().getHttps_flv().getUrl());
}else {
resultJjson.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl());
}
}
if (streamInfo.getTranscodeStream() != null) {
resultJjson.put("WS_FLV", streamInfo.getTranscodeStream().getWs_flv().getUrl());
}else {
resultJjson.put("WS_FLV", streamInfo.getWs_flv().getUrl());
}
if(streamInfo.getWss_flv() != null) {
resultJjson.put("WSS_FLV", streamInfo.getWss_flv().getUrl());
if (streamInfo.getTranscodeStream() != null) {
resultJjson.put("WSS_FLV", streamInfo.getTranscodeStream().getWss_flv().getUrl());
}else {
resultJjson.put("WSS_FLV", streamInfo.getWss_flv().getUrl());
}
}
resultJjson.put("RTMP", streamInfo.getRtmp().getUrl());
if (streamInfo.getRtmps() != null) {