|
@ -1,33 +1,24 @@ |
|
|
package org.dromara.sample.manage.controller; |
|
|
package org.dromara.sample.manage.controller; |
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.databind.JsonNode; |
|
|
import cn.hutool.core.convert.Convert; |
|
|
import io.seata.common.util.CollectionUtils; |
|
|
|
|
|
import io.seata.common.util.StringUtils; |
|
|
import io.seata.common.util.StringUtils; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import jakarta.annotation.Resource; |
|
|
import jakarta.annotation.Resource; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.dromara.business.api.RemoteBusinessTaskService; |
|
|
|
|
|
import org.dromara.common.redis.utils.RedisOpsUtils; |
|
|
import org.dromara.common.redis.utils.RedisOpsUtils; |
|
|
import org.dromara.common.redis.utils.RedisUtils; |
|
|
|
|
|
import org.dromara.common.satoken.utils.LoginHelper; |
|
|
|
|
|
import org.dromara.common.sdk.cloudapi.wayline.WaylineMethodEnum; |
|
|
|
|
|
import org.dromara.common.sdk.common.HttpResultResponse; |
|
|
import org.dromara.common.sdk.common.HttpResultResponse; |
|
|
import org.dromara.common.sdk.common.PaginationData; |
|
|
import org.dromara.common.sdk.mqtt.CommonTopicRequest; |
|
|
import org.dromara.common.sdk.exception.CloudSDKErrorEnum; |
|
|
import org.dromara.common.sdk.mqtt.CommonTopicResponse; |
|
|
import org.dromara.common.sdk.mqtt.*; |
|
|
import org.dromara.common.sdk.mqtt.MqttGatewayPublish; |
|
|
|
|
|
import org.dromara.common.sdk.mqtt.TopicConst; |
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetPublish; |
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetPublish; |
|
|
import org.dromara.common.sdk.mqtt.property.PropertySetReplyResultEnum; |
|
|
|
|
|
import org.dromara.common.sdk.mqtt.property.TopicPropertySetRequest; |
|
|
|
|
|
import org.dromara.common.sdk.mqtt.services.ServicesPublish; |
|
|
import org.dromara.common.sdk.mqtt.services.ServicesPublish; |
|
|
import org.dromara.common.sdk.mqtt.services.ServicesReplyReceiver; |
|
|
import org.dromara.common.sdk.mqtt.services.ServicesReplyReceiver; |
|
|
import org.dromara.common.sdk.mqtt.services.TopicServicesRequest; |
|
|
import org.dromara.common.sdk.mqtt.services.TopicServicesRequest; |
|
|
import org.dromara.sample.manage.model.dto.*; |
|
|
import org.dromara.sample.manage.model.dto.*; |
|
|
import org.dromara.sample.manage.service.IDeviceService; |
|
|
|
|
|
import org.dromara.system.api.RemoteConfigService; |
|
|
import org.dromara.system.api.RemoteConfigService; |
|
|
import org.dromara.system.api.model.LoginUser; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
import java.util.*; |
|
@ -207,11 +198,12 @@ public class MegaphoneController { |
|
|
@PostMapping("/{workspace_id}/getStreamIp") |
|
|
@PostMapping("/{workspace_id}/getStreamIp") |
|
|
@Operation(summary = "获取媒体流ip。", description = "获取媒体流ip。") |
|
|
@Operation(summary = "获取媒体流ip。", description = "获取媒体流ip。") |
|
|
public HttpResultResponse getStreamIp(@PathVariable("workspace_id") String workspaceId, |
|
|
public HttpResultResponse getStreamIp(@PathVariable("workspace_id") String workspaceId, |
|
|
@RequestBody DisobeyDTO param |
|
|
@RequestBody Map<String,Object>objectMap |
|
|
) { |
|
|
) { |
|
|
String top = "task/image/disobey/smoke"; |
|
|
String top = "task/image/disobey/smoke"; |
|
|
//发送mqtt
|
|
|
//发送mqtt
|
|
|
String s = remoteConfigService.selectStreamIp(); |
|
|
String s = remoteConfigService.selectStreamIp(); |
|
|
|
|
|
DisobeyDTO param = Convert.convert(DisobeyDTO.class, objectMap); |
|
|
if (StringUtils.isNotEmpty(param.getModel())){ |
|
|
if (StringUtils.isNotEmpty(param.getModel())){ |
|
|
String[] split = param.getModel().split(","); |
|
|
String[] split = param.getModel().split(","); |
|
|
for (String type : split){ |
|
|
for (String type : split){ |
|
|