事件订阅生产配置修改

This commit is contained in:
曹前明 2022-08-18 16:22:34 +08:00
parent 9916881124
commit c635b6b54a
4 changed files with 10 additions and 7 deletions

View File

@ -118,7 +118,7 @@ class SpClient:
v_num (int): 播放次数 v_num (int): 播放次数
""" """
uri = path uri = path
if 'http' in uri: if not uri.startswith('http'):
uri = settings.BASE_URL + path uri = settings.BASE_URL + path
json = { json = {
"sns": sns, "sns": sns,
@ -126,7 +126,7 @@ class SpClient:
"name": "songs_queue_append", "name": "songs_queue_append",
"params": { "params": {
"tid": ranstr(6), "tid": ranstr(6),
"vol": 50, "vol": 100,
"urls": [{ "urls": [{
"name": "alarm.mp3", "name": "alarm.mp3",
"uri": uri "uri": uri

View File

@ -216,8 +216,8 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet):
], ],
"subsystem": { "subsystem": {
"subsystemType": 0, "subsystemType": 0,
"name": "10.0.11.101_8000", "name": "qyjy_ehs",
"magic": "10.0.11.101_8000" "magic": "qyjy_ehs"
} }
} }
} }
@ -233,7 +233,7 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet):
取消事件订阅 取消事件订阅
""" """
dhClient.request(**dhapis['mq_unsubscribe'], dhClient.request(**dhapis['mq_unsubscribe'],
params={'name': '10.0.11.101_8000'}) params={'name': 'qyjy_ehs'})
return Response() return Response()
@action(methods=['post'], detail=False, @action(methods=['post'], detail=False,

View File

@ -305,7 +305,7 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
视频通道列表 视频通道列表
""" """
request.data.update({ request.data.update({
'channelTypeList': ["1"], 'unitTypeList': ["1"],
'includeSubOwnerCodeFlag': True 'includeSubOwnerCodeFlag': True
}) })
_, res = dhClient.request(**dhapis['channel_list'], json=request.data) _, res = dhClient.request(**dhapis['channel_list'], json=request.data)
@ -355,7 +355,7 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
闸机通道列表 闸机通道列表
""" """
request.data.update({ request.data.update({
'channelTypeList': ["7"], 'unitTypeList': ["7"],
'includeSubOwnerCodeFlag': True 'includeSubOwnerCodeFlag': True
}) })
_, res = dhClient.request(**dhapis['channel_list'], json=request.data) _, res = dhClient.request(**dhapis['channel_list'], json=request.data)

View File

@ -28,3 +28,6 @@ grpcio==1.47.0
grpcio-tools==1.47.0 grpcio-tools==1.47.0
protobuf==3.20.1 protobuf==3.20.1
pycryptodome==3.15.0 pycryptodome==3.15.0
aliyun-python-sdk-core==2.13.36
shapely==1.8.3