{ "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": {} } ] } ], "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": "f738695b16964509a000739e1d871902" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查找仓库", "TableValue": { "TableName": "Git仓库表", "TableValueType": 1, "BindingInfos": [ { "GUID": "0e7da4a8-d338-4585-b6f4-6ae272aea45f", "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": "20e643f89e194c438087b618ea1c338d" }, { "$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": "01d07583-5eb6-405f-b484-29a8d7106f5a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间路径名", "GUID": "7f004ded-49f9-49ce-aaed-9068c13ce993" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "4a5fcc35-c665-48d1-83f1-28c63a734fe9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "f0441eff-3746-44c5-942f-1faa63881cd3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "17792e75-3eb5-4f6d-8eea-7bcac52935eb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "e43337e6-136b-4973-a4c8-2da5df10b62c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "3fc25384-f0f3-40ed-95fd-a3642a72d4d1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "5e2f02ce-30e4-4fdd-8c07-9d0fa86a8e16" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "3ae9fe6a-fbe5-4cc4-b0f4-7359c4884e9a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "d4fe3175-f107-442e-82a1-d08b4083cf2b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "Callback_url", "GUID": "6fe0d807-fe6f-457e-8ed8-26a9b11e28ae" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.回调地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "e5897052-f6e0-405b-9689-91d47fc17020" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "订阅成功", "GUID": "fecb5c5e-7f64-41f2-8233-1950f0e42b55" }, "Value": "0" }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "默认分支", "GUID": "3b464c6f-277b-4666-998c-ee88dfebc54b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=默认分支" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "拉取人员", "GUID": "89afc82d-2392-444e-a70b-5b3120f0198c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前用户" } } ] } ], "ID": "063d5e71-2067-4b57-ab73-a90e9c3f156f" }, { "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": "041ebae7-da1f-43df-a747-66f663ec5585" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "空间名称", "GUID": "8acc8c3b-e022-42ef-9450-abacf3fcd0d2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=空间名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库路径名", "GUID": "2cc89fea-2197-4cf0-8502-b11dca95f55f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库路径名" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库名称", "GUID": "2838661d-8f4f-45dd-91ca-abd1b1372585" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库名称" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库地址", "GUID": "2e5df0c6-8d60-4c7a-a587-69dede5444cb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库地址" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库描述", "GUID": "053d8b3b-ee50-4fda-a985-84268d9cd2df" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库描述" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "仓库成员", "GUID": "c731ebd0-c516-4da9-b143-6399697db393" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库成员" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人", "GUID": "cba933c6-5a47-43f3-ae1e-331f9b72a0d7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "创建人头像", "GUID": "697c21b2-2f18-41f2-bbc3-730719276295" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=创建人头像" } }, { "BindingInfo": { "TableName": "Git仓库表", "ColumnName": "hook_api_url", "GUID": "89a225d4-5f79-47fd-934c-b146e56ca3ba" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=api_url" } } ] } ], "ID": "39943da2-0a3d-4f37-842c-6734d58d96fc" } ] } ] }, { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "同步仓库的所有提交", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "仓库ID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=仓库ID" } } ], "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": "=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": "20b8e4fe-a403-4f09-b3cb-4cc4da42fb4e" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"仓库创建成功,但未能订阅:\"&msg" } } ], "ID": "09991e26-2d6e-4e32-8f44-165c10530922" } ] } ], "ID": "a8630c8c-2e3a-4692-8e97-bfb03b27cdd8" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "仓库创建成功!" } ], "ID": "a2d6be65-1a95-4f68-a0fe-13c8f8cce023" } ] } ] }