Files
clue/ServerCommands/Gitee/增加仓库成员.json

368 lines
16 KiB
JSON

{
"Name": "增加仓库成员",
"Enabled": true,
"Triggers": [
{
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon",
"Parameters": [
{
"Name": "仓库ID",
"DataValidationInfo": {},
"TestData": "33487312"
},
{
"Name": "成员",
"DataValidationInfo": {},
"TestData": "linxi"
}
],
"InvokeTriggerTestData": {
"UserName": "Administrator"
}
}
],
"Commands": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "用户",
"TableValue": {
"TableName": "用户信息视图",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "6a0612b1-d332-4daf-a99f-a960fe3122b8",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT用户名",
"GUID": "25b330fd-62ed-4d0b-8ccc-cfeeb9087bb6"
},
"ColumnName": "GIT用户名"
},
{
"GUID": "676d1d48-bd57-4b6c-b310-a1f10b8f4edc",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT密码",
"GUID": "c41f664e-b1ad-4c3c-8e10-33926de9de12"
},
"ColumnName": "GIT密码"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "77f6497e-0a26-4e3d-92c4-4c807a455563"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=成员"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "5dc79d6e7c85431bab753562cd2dbb7c"
},
{
"$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.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "仓库",
"TableValue": {
"TableName": "Git仓库表",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "02a64056-1d4a-4fba-8f15-f0f02836bdf6",
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "空间路径名",
"GUID": "7c1ab6bb-1e3c-41fb-a2f5-a208f902fb3d"
},
"ColumnName": "空间路径名"
},
{
"GUID": "1a473aee-9478-4e60-ae48-06b4493998d9",
"BindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "仓库路径名",
"GUID": "549350b1-176c-40fa-957f-664b464a6fc0"
},
"ColumnName": "仓库路径名"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git仓库表",
"ColumnName": "仓库ID",
"GUID": "a46197a1-76be-4909-a1e7-e486efac36bd"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=仓库ID"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "e6bfd30904e34e50bc40ddb4f4c14f13"
},
{
"$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%",
"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"
}
},
{
"Name": "permission",
"DataItemType": 0,
"Data": "push"
}
]
}
},
"WebUrl": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"https://gitee.com/api/v5/repos/\"&仓库.空间路径名&\"/\"&仓库.仓库路径名&\"/collaborators/\"&用户.GIT用户名"
},
"Method": "PUT",
"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": "设置成员权限成功"
}
]
},
"CatchCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "日志表",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "日志表",
"ColumnName": "标题",
"GUID": "f65aa440-21a2-4891-a210-053b3d216252"
},
"Value": "新增或设置仓库成员权限"
},
{
"BindingInfo": {
"TableName": "日志表",
"ColumnName": "内容",
"GUID": "98ae3704-38d1-4161-9c84-77d6b82678eb"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionMessage"
}
},
{
"BindingInfo": {
"TableName": "日志表",
"ColumnName": "类型",
"GUID": "4a4476d9-09ee-4bf4-94de-59b4921a4831"
},
"Value": "错误"
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionCode"
},
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionMessage"
}
}
]
}
}
],
"ID": "1912b598-d49d-40f8-b735-1e772d30d92c"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=code"
},
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=msg"
}
}
],
"ID": "20dfb257-3661-43bc-8acd-517c2f494357"
}
]
}
],
"ID": "abe257cb-8d0f-49d1-8db0-37179fe1e9d6"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "仓库不存在"
}
],
"ID": "8c1d0bea-296f-4ebb-a749-8397a4bd94eb"
}
]
}
],
"ID": "bb47d61d-0865-431f-82ef-db495584470a"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "该用户尚未维护Gitee信息"
}
],
"ID": "b396c5b8-75ee-433f-b259-3dce60fa91c5"
}
]
}
]
}