From 157be5220d9d81bce18e8248ef6ac056415405a1 Mon Sep 17 00:00:00 2001
From: Tong <1025782220@qq.com>
Date: 星期二, 31 八月 2021 09:29:45 +0800
Subject: [PATCH] 更新推送库
---
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index 0d9542d..193f4c7 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -37,7 +37,7 @@
/// <returns></returns>
public static ResponsePackNew GetLogicIdList()
{
- var jObject = new JObject { { "homeId", LogicMethod.HomeId } };
+ var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId } };
var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_List);
//濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken
if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -114,6 +114,7 @@
{
var outputTypeJOb = new JObject { };
outputTypeJOb.Add("sid", dictionary.sid);
+ outputTypeJOb.Add("delay", dictionary.delay);
outputTypeJOb.Add("target_type", dictionary.target_type);
var statusArray = new JArray { };
foreach (var dic in dictionary.status)
@@ -153,7 +154,7 @@
var logicjArray = new JArray { };
var logicIfon = new JObject { };
logicIfon.Add("sid", logic.sid);
- logicIfon.Add("gatewayId", LogicMethod.GatewayId);
+ logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
logicIfon.Add("name", logic.name);
logicIfon.Add("relation", logic.relation);
logicIfon.Add("enable", logic.enable);
@@ -163,7 +164,7 @@
logicIfon.Add("noticeConfig", noticeConfigJObject);
logicIfon.Add("pushConfigs", pushConfigsArray);
logicjArray.Add(logicIfon);
- var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
+ var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add,5);
//濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken
if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
@@ -211,6 +212,7 @@
conditionJOb.Add("key", dic["key"]);
var c1 = "";
dic.TryGetValue("comparator", out c1);
+ c1 = string.IsNullOrEmpty(c1) ? "" : c1;
conditionJOb.TryAdd("comparator", c1);
conditionJOb.Add("data_type", dic["data_type"]);
conditionJOb.Add("value", dic["value"]);
@@ -225,6 +227,7 @@
{
var outputTypeJOb = new JObject { };
outputTypeJOb.Add("sid", dictionary.sid);
+ outputTypeJOb.Add("delay", dictionary.delay);
outputTypeJOb.Add("target_type", dictionary.target_type);
var statusArray = new JArray { };
foreach (var dic in dictionary.status)
@@ -244,7 +247,8 @@
var pushConfigsArray = new JArray { };
if (logic.pushConfigs.Count > 0)
- { //聽鎺ㄩ�佹枃鏈�
+ {
+ //聽鎺ㄩ�佹枃鏈�
foreach (var pushConfig in logic.pushConfigs)
{
@@ -264,7 +268,7 @@
var logicIfon = new JObject { };
logicIfon.Add("userLogicId", logic.userLogicId);
logicIfon.Add("sid", logic.sid);
- logicIfon.Add("gatewayId", LogicMethod.GatewayId);
+ logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
logicIfon.Add("name", logic.name);
logicIfon.Add("relation", logic.relation);
logicIfon.Add("enable", logic.enable);
@@ -275,7 +279,7 @@
logicIfon.Add("pushConfigs", pushConfigsArray);
logicjArray.Add(logicIfon);
- var jObject = new JObject { { "homeId", LogicMethod.HomeId }, { "logics", logicjArray } };
+ var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } };
responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Update,5);
//濡傛灉鏄痶oken杩囨湡鍒欏埛鏂皌oken
if (responsePackNew.Code == StateCode.TOKEN_EXPIRED)
--
Gitblit v1.8.0