{ "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": {} }, { "Name": "仓库URL", "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": "5252fab0-cb4d-446a-9693-8991b3100509" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "dd0162bf-1a2e-4674-9624-1fc45c02ff87" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "440536f5-b3cd-4156-b0f6-b6a64d1afd81" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "b1b76a67-9ca6-4f8c-9a1e-1f22665f2cf4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "be307fcd-4ac7-4982-9330-cf2df0e12dee" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "790e4a41-e053-414e-905f-9fea0925e6a0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "8bbcb300-91ff-459c-b0b2-7af867cfe95c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "d16d40ca-2348-48e1-b556-487ce8667130" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "4a5d2361-bcff-4aaf-8cd0-1c7518461ca6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "642aa423-344d-4ecd-b322-36171bd0b405" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "Callback_url", "GUID": "49ca0165-39cd-4d54-998a-c687ede21e3c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "832bb491-3904-490d-8949-7c5e5316e8a1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "364b9e00-7988-422d-9fab-151c222ccf2c" }, "Value": "0" }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "默认分支", "GUID": "e928a3b2-2e28-4c40-8cd4-fb5ad6423d6b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=默认分支" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "拉取人员", "GUID": "144431fe-7ee2-4a9c-9a7a-1804fe29efcb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前用户" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库URL", "GUID": "8b3bd8d8-849d-4618-ac62-eeaa67a12fc5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库URL" } } ] } ], "ID": "58ea9c64-95c7-4dd0-bd6b-b175530c68fe" }, { "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": "75112a8a-9848-4940-877c-ac9a006f4c66" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "54601920-1b2b-4ca4-93ec-d3898450f25a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "2f4a3893-cf6d-4503-83ee-7b148ce04e98" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "b1daf34b-60b6-4436-a24f-e8470bcc48e4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "2971fcde-5e57-4121-b47f-5c4a355aeced" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "27085df6-39e2-46e7-8791-662a474bcb21" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "6bce128e-2c75-421c-9950-6dbaf5999d7e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "1be66450-577f-40de-a23c-85ee770e67b7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "5d8597e6-21c3-4a1c-9f48-1202675fb0eb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "192ef3fe-59f1-46db-aa58-84dd1777030e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库URL", "GUID": "e33d2bcd-002e-4787-8914-b4003e2ed5a6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库URL" } } ] } ], "ID": "e750b3e5-166a-4ad3-9590-995560d6f30c" } ] } ] }, { "$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": "fe3813d2-c7d1-4048-8ca8-4fc0e5ed16f6" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"仓库创建成功,但未能订阅:\"&msg" } } ], "ID": "0123b316-0351-483f-896b-64ccc0dd4dd2" } ] } ], "ID": "a06a4963-f475-411e-9088-f5c1ea186675" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "仓库创建成功!" } ], "ID": "0f441038-adfb-4249-a8e4-aff523c539d0" } ] } ] }