{ "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_Anonymous" ] } ] } }, "HttpMethod": 3, "Parameters": [ { "Name": "授权码", "DataValidationInfo": { "IgnoreBlank": false } } ] } ], "Commands": [ { "$type": "DingTalkPlugin.Getuserinfo, DingTalkPlugin", "Code": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=授权码" }, "UserInfo": "用户信息" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查找用户", "TableValue": { "TableName": "用户信息视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "0e801573-63c6-4815-ba71-6ececc3d1e7b", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "37f86a0d-9aa8-4731-8aef-ab55b140fe53" }, "ColumnName": "用户名" }, { "GUID": "16fc5332-f750-43cd-aab2-e63edbe91365", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "25b13193-8f00-4f41-9ad6-3f2e410825ed" }, "ColumnName": "全名" }, { "GUID": "6da634f2-4701-4cf0-8a42-63ed109e7d82", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "邮件", "GUID": "9e3dbcde-f83c-43ec-adbb-ff4b94906832" }, "ColumnName": "邮件" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "DingTalkUnionID", "GUID": "44ae3fa7-ee61-42a7-a76c-4654379d177f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户信息.unionid" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "2e9be2a689684d6588f40934cf71b3f1" }, { "$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": "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": "DingTalkUnionID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户信息.unionid" } } ] } }, { "$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2", "OperationType": "101", "CommandOperator": { "$type": "UserManagementCommandsV2.LoginOperator, UserManagementCommandsV2", "UserName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=查找用户.用户名" }, "IsCheckPassword": false, "RememberMe": "1" } }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "登录成功", "CustomReturns": [ { "ReturnPropertyName": "unionid", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户信息.unionid" } } ] } ], "ID": "96422d9f-da59-4f2d-a70e-ffce00dd48ac" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "300", "Message": "请绑定账号后登录", "CustomReturns": [ { "ReturnPropertyName": "unionid", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户信息.unionid" } } ] } ], "ID": "1e7196fc-55e2-4c56-975d-1ca79c10b2c1" } ] } ], "ReturnProperties": [ { "Name": "unionid" } ] }