|
@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
import io.seata.common.util.StringUtils; |
|
|
import io.seata.common.util.StringUtils; |
|
|
import jakarta.annotation.Resource; |
|
|
import jakarta.annotation.Resource; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.apache.dubbo.config.annotation.DubboReference; |
|
|
import org.dromara.common.sdk.cloudapi.device.*; |
|
|
import org.dromara.common.sdk.cloudapi.device.*; |
|
|
import org.dromara.common.sdk.cloudapi.firmware.*; |
|
|
import org.dromara.common.sdk.cloudapi.firmware.*; |
|
@ -56,7 +57,6 @@ import org.dromara.system.api.RemoteConfigService; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
@ -124,8 +124,9 @@ public class PlayTextServiceImpl implements IPlayTextService { |
|
|
public HttpResultResponse streamType(Map<String, Object> objectMap) { |
|
|
public HttpResultResponse streamType(Map<String, Object> objectMap) { |
|
|
String top = "task/image/disobey/streamType"; |
|
|
String top = "task/image/disobey/streamType"; |
|
|
//发送mqtt
|
|
|
//发送mqtt
|
|
|
String s = remoteConfigService.selectStreamType(objectMap.get("deviceSn").toString()); |
|
|
List<String> list = remoteConfigService.selectStreamType(objectMap.get("deviceSn").toString()); |
|
|
if (StringUtils.isNotEmpty(s)){ |
|
|
if (CollectionUtils.isNotEmpty(list)){ |
|
|
|
|
|
for (String s : list){ |
|
|
String[] split = s.split(","); |
|
|
String[] split = s.split(","); |
|
|
objectMap.put("deptId",split[0]); |
|
|
objectMap.put("deptId",split[0]); |
|
|
objectMap.put("deptName",split[1]); |
|
|
objectMap.put("deptName",split[1]); |
|
@ -135,6 +136,7 @@ public class PlayTextServiceImpl implements IPlayTextService { |
|
|
gatewayPublish.publish(top,new CommonTopicRequest<>() |
|
|
gatewayPublish.publish(top,new CommonTopicRequest<>() |
|
|
.setData(Objects.requireNonNull(param)),1); |
|
|
.setData(Objects.requireNonNull(param)),1); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
return HttpResultResponse.error("请求成功"); |
|
|
return HttpResultResponse.error("请求成功"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|