{ "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": {} } ] } ], "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": "54d3c5b327f8449babca7b5f296cea3a" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查找仓库", "TableValue": { "TableName": "Git仓库表", "TableValueType": 1, "BindingInfos": [ { "GUID": "4f669f8c-c38e-452c-9223-35f7a9a27572", "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": "fc30c0772f5e4ae99affdaa5209494b1" }, { "$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": "1082605c-1429-4edc-8b4c-434c60c43252" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "a2efe75d-6164-4966-b690-801e3795d21a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "a2479990-5f1b-4983-acc4-20f68b94af90" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "eaaa2b00-c63d-4394-a2fe-49c500e2faef" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "1b2b0532-572e-4331-ac85-988cbce958c1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "5c424701-fce3-44cc-b626-7f14dc7f41c6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "c9c4e52a-839e-4483-9c35-9118cf4ce34d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "8e47036f-a48c-45a7-b205-b42e39cbf499" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "1599bc4e-4103-48b1-a5b4-960d658cee14" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "abb4a6b9-7c75-4455-91c3-dd62370f62a5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_url", "GUID": "a9d19b38-b4ab-49dc-8ec3-0544384e5c58" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "50edfabc-aecf-4851-af6f-0f8f09b6a4be" }, "Value": "0" } ] } ], "ID": "cce9653e-ed26-4971-bb60-868b659af738" }, { "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": "dd12a605-d5a6-4fdc-8d3e-cb2c5afc191e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "31dadfcb-2aef-4091-b467-3c1c15e30b76" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "9dcbe99d-92b4-4cb1-aad2-ba5bbeb034b3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "a4ae2be3-852a-469f-b408-142d80f48e19" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "2bdc2766-1b71-49a0-b2af-3ac04a956158" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "1cf9fc74-7684-44f9-b48c-fc5f7b15b2b2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "91a2422b-e5db-4225-9ef3-2368813a02bb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "88141a74-bb6d-415a-bc4e-dd6fe45111f1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "1329af92-8a83-4cba-9294-a8e6349f5e73" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } } ] } ], "ID": "8d7222c3-a0df-4084-a9e8-39635a46a376" } ] } ] }, { "$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": "26633f60-fa35-46ed-8a51-214624ab8565" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"仓库创建成功,但未能订阅:\"&msg" } } ], "ID": "f154763b-8f00-458c-b886-edf25bd928a8" } ] } ], "ID": "937774c3-9d6c-4e46-a752-2d3f181e52de" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "仓库创建成功!" } ], "ID": "2eb0ad43-5996-4e32-8d39-1cd1f5e3cb0d" } ] } ] }