From 7ed43b4a3d2e178e9af7f4aa38ae0358c789a4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E5=93=A5?= Date: Thu, 4 Jul 2024 10:04:13 +0800 Subject: [PATCH] =?UTF-8?q?{"Message":"1","MessageType":2,"Modules":[{"Sta?= =?UTF-8?q?te":1,"Type":27,"Name":"ServerCommandPrivate/=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7"}],"Version":"v1"?= =?UTF-8?q?}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .collaboration | 11 +- ServerCommands/系统/自动更新版本号.json | 204 ++++++++++++++---------- 2 files changed, 124 insertions(+), 91 deletions(-) diff --git a/.collaboration b/.collaboration index d66af3c0..92574142 100644 --- a/.collaboration +++ b/.collaboration @@ -2246,16 +2246,7 @@ }, { "ModuleName": "ServerCommandPrivate/自动更新版本号", - "State": 1, - "LockedBy": { - "UserName": "超哥", - "Email": "phoben@qq.com" - }, - "LockDateTime": "2024-07-04T10:03:00.074568+08:00", - "ModuleType": 27, - "ToRemoveFiles": [ - "ServerCommands\\系统\\自动更新版本号.json" - ] + "ModuleType": 27 }, { "ModuleName": "ServerCommand/更新版本号到页面", diff --git a/ServerCommands/系统/自动更新版本号.json b/ServerCommands/系统/自动更新版本号.json index 0dec1e26..2a0a4d59 100644 --- a/ServerCommands/系统/自动更新版本号.json +++ b/ServerCommands/系统/自动更新版本号.json @@ -11,27 +11,13 @@ ], "Commands": [ { - "$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi", - "PostData": { - "DataItemType": 1, - "Data": { - "$type": "PostDataToWebApi.ObjectData, PostDataToWebApi", - "Data": [ - { - "Name": "VersionID", - "DataItemType": 0, - "Data": 1 - } - ] - } + "$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand", + "JsonString": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=全局_业务配置" }, - "WebUrl": "https://develop.gridfriend.cn/clue/ServerCommand/GetLastVersion", - "Method": "GET", - "SuccessCallback": "// 请求成功返回的数据存储在“result”变量中\r\n// 请使用“result”变量来完成请求成功的回调 \r\n//console.log(result);", - "ErrorCallback": "// 请求中发生的错误存储在“error”变量中\r\n// 请使用“error”变量来处理异常情况 \r\nconsole.error(error);", - "NewParameter": "result", - "Header": [], - "Timeout": 100.0 + "SampleJson": "{\r\n \"版本名\": \"Develop\",\r\n \"版本号\": \"\",\r\n \"版本ID\":1\r\n}", + "ToParameter": "业务配置" }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", @@ -43,89 +29,145 @@ "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=result.ErrCode" + "SerializeProperty": "=业务配置.版本ID" } }, - "value": "0" + "value": "%Null%", + "compareType": 1 }, "CommandList": [ { - "$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand", - "JsonString": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=全局_业务配置" + "$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi", + "PostData": { + "DataItemType": 1, + "Data": { + "$type": "PostDataToWebApi.ObjectData, PostDataToWebApi", + "Data": [ + { + "Name": "VersionID", + "DataItemType": 0, + "Data": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=业务配置.版本ID" + } + } + ] + } }, - "SampleJson": "{\r\n \"版本名\": \"Develop\",\r\n \"版本号\": \"\"\r\n}", - "ToParameter": "业务配置" + "WebUrl": "https://develop.gridfriend.cn/clue/ServerCommand/GetLastVersion", + "Method": "GET", + "SuccessCallback": "// 请求成功返回的数据存储在“result”变量中\r\n// 请使用“result”变量来完成请求成功的回调 \r\n//console.log(result);", + "ErrorCallback": "// 请求中发生的错误存储在“error”变量中\r\n// 请使用“error”变量来处理异常情况 \r\nconsole.error(error);", + "NewParameter": "result", + "Header": [], + "Timeout": 100.0 }, { - "$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit", - "Operation": 4, - "InParamater": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=业务配置" - }, - "OperationParamaterPairs": [ + "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", + "ConditionAndCommandPairList": [ { - "Name": "版本名", - "Value": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=result.Name" - } + "Condition": { + "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", + "param": { + "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", + "ParamObject": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=result.ErrCode" + } + }, + "value": "0" + }, + "CommandList": [ + { + "$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit", + "Operation": 4, + "InParamater": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=业务配置" + }, + "OperationParamaterPairs": [ + { + "Name": "版本名", + "Value": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=result.Name" + } + }, + { + "Name": "版本号", + "Value": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=result.Version" + } + }, + { + "Name": "版本ID", + "Value": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=业务配置.版本ID" + } + } + ], + "OutParamaterName": "新业务配置" + }, + { + "$type": "JsonUtilityCommand.JsonSerializeCommand, JsonUtilityCommand", + "SourceObject": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=新业务配置" + }, + "ToParameter": "新业务配置字符串" + }, + { + "$type": "Forguncy.Model.Commands.ServerChangeGlobalPropertyCommand, ServerDesignerCommon", + "ChangedGlobalProperties": [ + { + "Name": "全局_业务配置", + "Formula": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=新业务配置字符串" + } + } + ] + }, + { + "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", + "ErrorCode": "0", + "Message": "设置成功" + } + ], + "ID": "e0060989-7e8e-4302-8723-53a3cc456848" }, { - "Name": "版本号", - "Value": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=result.Version" - } - } - ], - "OutParamaterName": "新业务配置" - }, - { - "$type": "JsonUtilityCommand.JsonSerializeCommand, JsonUtilityCommand", - "SourceObject": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=新业务配置" - }, - "ToParameter": "新业务配置字符串" - }, - { - "$type": "Forguncy.Model.Commands.ServerChangeGlobalPropertyCommand, ServerDesignerCommon", - "ChangedGlobalProperties": [ - { - "Name": "全局_业务配置", - "Formula": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=新业务配置字符串" - } + "CommandList": [ + { + "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", + "ErrorCode": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=result.ErrCode" + }, + "Message": { + "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", + "SerializeProperty": "=result.Message" + } + } + ], + "ID": "84cf9285-4048-42ea-ade9-8c2f6307ded5" } ] - }, - { - "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", - "ErrorCode": "0", - "Message": "设置成功" } ], - "ID": "79dce003-18a0-4571-91a5-88f376530dc4" + "ID": "a3f8292f-4617-41da-931d-2d9fa4412a2d" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", - "ErrorCode": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=result.ErrCode" - }, - "Message": { - "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", - "SerializeProperty": "=result.Message" - } + "ErrorCode": "0", + "Message": "尚未指定版本ID" } ], - "ID": "9a647215-dd71-4e8c-9935-4858e4ec4f54" + "ID": "53b64c14-dfb9-4852-b8a3-2b8aeccf809e" } ] }