{ "Name": "更新GITEE信息", "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": "用户名", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "Administrator" }, { "Name": "Git用户名", "DataValidationInfo": {}, "TestData": "cuckooent" }, { "Name": "Git密码", "DataValidationInfo": {}, "TestData": "x6158891C" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand", "JsonString": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=全局_Gitee" }, "SampleJson": "{\r\n \"client_id\": \"c7d05fcbaf78ad728fcc0267d081ae6c50dc667667758a0933525d4cbe09ed90\",\r\n \"client_secret\": \"b4d40db2155ca530e5771b37a2fb67161d4106c64df28f32504b4e3bcfb81313\"\r\n}", "ToParameter": "Gitee配置" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "用户", "TableValue": { "TableName": "用户信息视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "1b272cc8-ff24-4aa1-9795-10b22b504bbf", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "adce5931-be11-4801-8178-6bed10f2c9b2" }, "ColumnName": "用户名" }, { "GUID": "4e191c4a-ccc0-485a-bd61-0ebecf122d49", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "7deda464-b19d-48b4-bb68-3f738a324abc" }, "ColumnName": "全名" }, { "GUID": "a0ee631b-9b0d-48a1-b2d1-66c9e0922682", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "邮件", "GUID": "614d14c1-d3eb-474c-8645-4e7aa800c8e0" }, "ColumnName": "邮件" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "5528766a-0121-41a8-99b1-1d47fcfc5c60" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户名" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "24f1c159d1b34db09b2072799a47af8d" }, { "$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.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "PostDataToWebApi.PostDataCommand, PostDataToWebApi", "PostData": { "DataItemType": 1, "Data": { "$type": "PostDataToWebApi.ObjectData, PostDataToWebApi", "Data": [ { "Name": "grant_type", "DataItemType": 0, "Data": "password" }, { "Name": "username", "DataItemType": 0, "Data": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Git用户名" } }, { "Name": "password", "DataItemType": 0, "Data": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Git密码" } }, { "Name": "client_id", "DataItemType": 0, "Data": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.client_id" } }, { "Name": "client_secret", "DataItemType": 0, "Data": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Gitee配置.client_secret" } }, { "Name": "scope", "DataItemType": 0, "Data": "user_info projects pull_requests issues notes keys hook groups gists enterprises" } ] } }, "JsonString": "", "WebUrl": "https://gitee.com/oauth/token", "Method": "POST", "SuccessCallback": "// 请求成功返回的数据存储在“result”变量中\r\n// 请使用“result”变量来完成请求成功的回调 \r\n//console.log(result);", "ErrorCallback": "// 请求中发生的错误存储在“error”变量中\r\n// 请使用“error”变量来处理异常情况 \r\nconsole.error(error);", "NewParameter": "result", "Header": [], "Timeout": 100.0 }, { "$type": "SaveFormData.fillInJSONProperties, SaveFormData", "FullJsonString": "{\r\n \"error\": \"invalid_grant\",\r\n \"error_description\": \"授权方式无效,或者登录回调地址无效、过期或已被撤销\",\r\n \"access_token\": \"5c7c5fe2b1f0fc025c1a38006b6e95f3\",\r\n \"token_type\": \"bearer\",\r\n \"expires_in\": 86400,\r\n \"refresh_token\": \"03be42668ee199713604ff75491eeb0904a665d069de178c6c8f73c0a50a6ab6\",\r\n \"scope\": \"user_info projects pull_requests issues notes keys hook groups gists enterprises\",\r\n \"created_at\": 1718241807\r\n}", "SourceJson": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=result" }, "ResultTo": "RES" }, { "$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": "=RES.error" } }, "value": "%Null%" }, "CommandList": [ { "$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2", "OperationType": "202", "CommandOperator": { "$type": "UserManagementCommandsV2.UpdateUserOperator, UserManagementCommandsV2", "UserName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户名" }, "FullName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户.全名" }, "Email": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户.邮件" }, "ExtendedProperties": [ { "Name": "GIT用户名", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Git用户名" } }, { "Name": "GIT密码", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Git密码" } } ] } }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "保存成功" } ], "ID": "df2cd8ce-4e73-4a8b-85df-180b0949aa34" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=result.error" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=result.error_description" } } ], "ID": "ea8076ef-b819-4029-bb5d-ebcf514eca02" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ], "ID": "94f9be73-f984-42bf-9355-c123574a639c" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "用户不存在" } ], "ID": "e8d89883-dea9-46c1-8ced-fae6c6e8ff54" } ] } ] }