{ "Name": "同步一个仓库到表", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon", "Permission": { "PermissionData": { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core", "permissionResource": { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core" }, "permissionBindings": [ { "$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core", "roleNames": [ "FGC_LoginUser" ] } ] } }, "Parameters": [ { "Name": "仓库ID", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "空间路径名", "DataValidationInfo": {} }, { "Name": "空间名称", "DataValidationInfo": {} }, { "Name": "仓库路径名", "DataValidationInfo": {} }, { "Name": "仓库名称", "DataValidationInfo": {} }, { "Name": "仓库地址", "DataValidationInfo": {} }, { "Name": "仓库描述", "DataValidationInfo": {} }, { "Name": "仓库成员", "DataValidationInfo": {} }, { "Name": "创建人", "DataValidationInfo": {} }, { "Name": "创建人头像", "DataValidationInfo": {} }, { "Name": "api_url", "DataValidationInfo": {} }, { "Name": "默认分支", "DataValidationInfo": {} } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand", "JsonString": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=全局_Gitee" }, "SampleJson": "{\"client_id\":\"c7d05fcbaf78ad728fcc0267d081ae6c50dc667667758a0933525d4cbe09ed90\",\"client_secret\":\"b4d40db2155ca530e5771b37a2fb67161d4106c64df28f32504b4e3bcfb81313\",\"回调地址\":\"https://develop.gridfriend.cn/pms/ServerCommand/GitCallback\"}", "ToParameter": "Gitee配置" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "当前用户", "ParameterValue": "%CurrentUser%", "ID": "1dd4782fe94f4a11941ae75c0bfc282c" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查找仓库", "TableValue": { "TableName": "Git仓库表", "TableValueType": 1, "BindingInfos": [ { "GUID": "2103657e-50c4-48c0-bb28-21b1c95f28aa", "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "917e816f-695c-4b75-af4d-bb404ea81fb2" }, "ColumnName": "绑定成功" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库ID", "GUID": "cb3e1ea6-5719-447f-9e75-84923cffaf89" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "a705fda09a50494186c5584333d88fc8" }, { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=查找仓库" } }, "value": "%Null%" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "Git仓库表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库ID", "GUID": "6adb9f20-7e82-4699-b558-6ecee2653c09" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "94846f43-0a6f-40ee-b2e6-83f59c05a4a9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "e82b75f1-2032-450f-b0ee-ab508bc0fa1d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "eea7bc5d-66a2-44cd-9c1b-4c898fd49c6a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "561f1d4e-38b7-4e26-8098-c56a8d4c9c8b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "b79b52bd-1ccc-40b7-8fe3-6739e34398f5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "a6b61d0f-c37c-4e38-b24c-a06a10911842" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "4ebd6aef-84f4-4d04-abe4-e0c4ce78a14c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "68ffe807-9d1b-419a-b8e5-88977ab05b7b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "fe861d19-f466-4e43-96a5-bff6c89ed158" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "Callback_url", "GUID": "b01b60e0-20cc-40bc-877b-75d84018c6de" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "b87fb425-c4bb-407c-bbd9-d90d5cfea992" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "fd497669-e4c4-463a-bef4-b4add036384f" }, "Value": "0" }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "默认分支", "GUID": "9c785663-d269-413e-9b3b-1d8163dc2e78" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=默认分支" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "拉取人员", "GUID": "f4a55dcb-d85b-4263-bbfe-1e990a39c69c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前用户" } } ] } ], "ID": "ca71c4d3-299e-446c-8353-3cbe10d02cf9" }, { "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "Git仓库表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库ID", "GUID": "0cb22c5e-6428-421d-b601-e71f8fe673bd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "e95ccec9-8e00-4478-8e7a-b18dfd6bc83e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "ad7a894a-8c65-44a7-a70e-a0593e038866" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "1edfa77c-92a3-430e-965f-15afd1212d09" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "fdd8cb58-5f17-4e26-a3d3-a73b985fefa7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "33ae0ef1-12c5-4727-8561-2dbbc96e67ef" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "fbd8e474-2010-4e5c-8295-0f5ae0092af1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "994e6d2d-9eed-47f9-bc3e-62973495c45d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "c4546402-cef1-4b98-ada8-1856a410496c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "910d2883-d6d7-49b7-b730-c8bd24df1f12" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "d8990b5c-4417-49e7-a5f7-8d8d9a24f7cb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } } ] } ], "ID": "b433409a-d06e-4b6e-9c2c-bfa80d8d309a" } ] } ] }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } }, "value": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "创建一个仓库WebHook", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "仓库ID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "用户名", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前用户" } }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "回调地址", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "RefreshAfterFinish": true, "CheckDataValidation": true }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=code" } }, "value": "0" }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "仓库创建并订阅成功!" } ], "ID": "716dc202-3922-45da-9fd3-e013b582bfd6" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"仓库创建成功,但未能订阅:\"&msg" } } ], "ID": "ebc5303a-73aa-4cab-82c1-9c3b31bd4790" } ] } ], "ID": "c99f5e6b-f975-4b3f-8ebd-ca9feac5ad27" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "仓库创建成功!" } ], "ID": "084ac9fe-56a6-4e20-bdaa-510ec487c06a" } ] } ] }