{ "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": "f93daff7-8a41-4e6d-ae95-c5da5cf2d4ea", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "adce5931-be11-4801-8178-6bed10f2c9b2" }, "ColumnName": "用户名" }, { "GUID": "e492c62f-3726-431f-a9b8-f0803767cb90", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "7deda464-b19d-48b4-bb68-3f738a324abc" }, "ColumnName": "全名" }, { "GUID": "e4431bdd-85fc-4c72-970f-74bbba378349", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "邮件", "GUID": "07d2c92f-708b-46a8-9610-3c326740dd88" }, "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": "3f0ffb1d3f7f4655b6e6d27fe8b598f3" }, { "$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": "014e33da-3afd-4d65-80e7-af7fd58ced10" }, { "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": "e6d43ff4-be74-45c3-b98a-7a140635f32d" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ], "ID": "465ea1cc-084f-4a65-8d72-4db87b5030d2" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "用户不存在" } ], "ID": "81378159-d987-4662-a42b-0abef3076cf0" } ] } ] }