{ "Name": "绑定钉钉UnionId", "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": {} } ] } ], "Commands": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "用户名", "ParameterValue": "%CurrentUser%", "ID": "a41de320a3be4bb29d7bf34d1c395e69" }, { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "通过免登码获取用户信息", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "AuthCode", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=免登码" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "ReturnPropertiesTo": [ { "ResultPropertyName": "钉钉UnionId", "ResultTo": { "SerializeProperty": "UnionId" } } ], "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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "已有用户", "TableValue": { "TableName": "用户信息视图", "TableValueType": 1, "BindingInfos": [ { "GUID": "4f0a2d69-ffbe-45ae-a7db-5488b75f4330", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "cb83f460-0a24-4f8c-8b34-791984246e2b" }, "ColumnName": "用户名" }, { "GUID": "6248259e-e0ed-4ae4-a6ae-590c34dbcbe1", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "92ccdb26-a718-4d80-bef6-9ed36c5a701c" }, "ColumnName": "全名" }, { "GUID": "728f6dae-83c9-4379-a139-d7657263f88a", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "邮件", "GUID": "9ca07348-4b82-408e-86ce-9043b2156586" }, "ColumnName": "邮件" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "用户信息视图", "ColumnName": "DingTalkUnionID", "GUID": "41af5aa1-0d6f-4353-8980-5cecbdd4353a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=UnionId" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "e522a1e925af4e84bbd04f66a6461c95" }, { "$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%" }, "CommandList": [ { "$type": "UserManagementCommandsV2.UserManagementCommand, UserManagementCommandsV2", "OperationType": "202", "CommandOperator": { "$type": "UserManagementCommandsV2.UpdateUserOperator, UserManagementCommandsV2", "UserName": { "$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": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "绑定成功", "CustomReturns": [ { "ReturnPropertyName": "UnionId", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=UnionId" } } ] } ], "ID": "2d0bac70-629b-4de4-9e97-dc5fa47fd892" }, { "CommandList": [ { "$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": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=用户名" } }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "绑定成功", "CustomReturns": [ { "ReturnPropertyName": "UnionId", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=UnionId" } } ] } ], "ID": "c9a04d70-a9e7-4365-84c1-a8c68c5c9b23" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前钉钉账号已被\"&已有用户.全名&\"的账号绑定,请先解绑后再试!\"" }, "CustomReturns": [ { "ReturnPropertyName": "UnionId" } ] } ], "ID": "d35a88ca-bcb7-4757-ace6-051d912b77bb" } ] } ], "ID": "9f5ca602-8c4f-43b0-8bd6-b8cd2a6fd4cd" } ] } ], "ID": "980da40b-763b-4352-b662-768260554228" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=code" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=msg" }, "CustomReturns": [ { "ReturnPropertyName": "UnionId" } ] } ], "ID": "5afbe41c-4a47-48db-ab44-8231e84b8247" } ] } ], "ReturnProperties": [ { "Name": "UnionId" } ] }