|
|
@@ -11,6 +11,7 @@ import com.dji.sample.manage.log.annotation.Log;
|
|
|
import com.dji.sample.manage.log.enums.BusinessType;
|
|
|
import com.dji.sample.manage.model.dto.ManageDeviceLivestreamUrlDTO;
|
|
|
import com.dji.sample.manage.model.dto.RtmpUrlDTO;
|
|
|
+import com.dji.sample.manage.model.dto.UpstreamLivestreamUrlDTO;
|
|
|
import com.dji.sample.manage.model.entity.ManageDeviceLivestreamUrlEntity;
|
|
|
import com.dji.sample.manage.model.entity.UserEntity;
|
|
|
import com.dji.sample.manage.model.enums.LiveUrlTypeEnum;
|
|
|
@@ -150,8 +151,8 @@ public class ManageDeviceLivestreamUrlServiceImpl implements IManageDeviceLivest
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<String> selWebRtc(String payload, String deviceSn) {
|
|
|
- List<String> resultList = new ArrayList<>();
|
|
|
+ public List<UpstreamLivestreamUrlDTO> selWebRtc(String payload, String deviceSn) {
|
|
|
+ List<UpstreamLivestreamUrlDTO> resultList = new ArrayList<>();
|
|
|
LambdaQueryWrapper<ManageDeviceLivestreamUrlEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(ManageDeviceLivestreamUrlEntity::getUrlType,LiveUrlTypeEnum.WEBRTC.getVal())
|
|
|
.eq(null!= payload,ManageDeviceLivestreamUrlEntity::getPayloadIndex,payload)
|
|
|
@@ -159,7 +160,12 @@ public class ManageDeviceLivestreamUrlServiceImpl implements IManageDeviceLivest
|
|
|
List<ManageDeviceLivestreamUrlEntity> result = mapper.selectList(wrapper);
|
|
|
if(result.size() > 0 ) {
|
|
|
for(ManageDeviceLivestreamUrlEntity entity :result) {
|
|
|
- resultList.add(entity.getUrl());
|
|
|
+ UpstreamLivestreamUrlDTO upstreamLivestreamUrlDTO = new UpstreamLivestreamUrlDTO();
|
|
|
+ upstreamLivestreamUrlDTO.setWorkspaceId(entity.getWorkspaceId());
|
|
|
+ upstreamLivestreamUrlDTO.setDeviceSn(entity.getDeviceSn());
|
|
|
+ upstreamLivestreamUrlDTO.setUrl(entity.getUrl());
|
|
|
+ upstreamLivestreamUrlDTO.setPayload(entity.getPayloadIndex());
|
|
|
+ resultList.add(upstreamLivestreamUrlDTO);
|
|
|
}
|
|
|
}
|
|
|
return resultList;
|