{ "Name": "判断是否为仓库成员", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon", "Parameters": [ { "Name": "检测用户", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "linxi" }, { "Name": "空间路径", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "yugasoft" }, { "Name": "仓库路径", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "sst-ga-res" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "用户", "TableValue": { "TableName": "用户信息视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "640dd92f-0bf8-4391-b3eb-f0b1dd379336", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "GIT用户名", "GUID": "cfc0c600-5d1f-41ba-ad07-8c77444e5748" }, "ColumnName": "GIT用户名" }, { "GUID": "d2b48381-be2c-4e45-96da-5de9ed58bf8a", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "GIT密码", "GUID": "ec2222a1-0ee7-4b1a-8872-5a9f101f9495" }, "ColumnName": "GIT密码" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "59cb0c69-e361-405b-8b58-c3337407a53e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=检测用户" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "b67c61c022a24531a060cb6141bbce88" }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户" } }, "value": "%Null%", "compareType": 1 }, { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户.GIT用户名" } }, "value": "%Null%", "compareType": 1 } ] }, "CommandList": [ { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "请求令牌", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "用户名", "Value": "Administrator" }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "强制刷新", "Value": "0" } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "ReturnPropertiesTo": [ { "ResultPropertyName": "最新令牌", "ResultTo": { "SerializeProperty": "ACCESS_TOKEN" } } ], "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.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "GETPOST.编码类.URL编码, GETPOST", "BianmaMsg": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户.GIT用户名" }, "BianMaTpye": 1, "BianMaFun": 1, "FanHuiMsg": "编码用户名" }, { "$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi", "PostData": { "DataItemType": 1, "Data": { "$type": "PostDataToWebApi.ObjectData, PostDataToWebApi", "Data": [ { "Name": "access_token", "DataItemType": 0, "Data": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ACCESS_TOKEN" } } ] } }, "WebUrl": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"https://gitee.com/api/v5/repos/\"&空间路径&\"/\"&仓库路径&\"/collaborators/\"&编码用户名" }, "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": 10.0 }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "该成员为仓库成员", "CustomReturns": [ { "ReturnPropertyName": "ACCESS_TOKEN", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ACCESS_TOKEN" } } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "该成员不为仓库成员", "CustomReturns": [ { "ReturnPropertyName": "ACCESS_TOKEN", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ACCESS_TOKEN" } } ] } ] } } ], "ID": "78826300-5643-4881-89dd-d7009b0118e8" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=code" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=msg" }, "CustomReturns": [ { "ReturnPropertyName": "ACCESS_TOKEN" } ] } ], "ID": "d4260203-01ec-4981-b3c3-e27dd0108830" } ] } ], "ID": "afdf11a9-69e2-4f2b-8a75-9c5916b4f874" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "该用户尚未维护Gitee信息", "CustomReturns": [ { "ReturnPropertyName": "ACCESS_TOKEN" } ] } ], "ID": "12b76645-89df-4c44-af81-c4dcc86389f7" } ] } ], "ReturnProperties": [ { "Name": "ACCESS_TOKEN" } ] }