{ "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": "7293ce1d75204871ae6cf8fe3c8e26e1" }, { "$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": "859861e5-a372-47ad-a99f-e9d3e3c9b06e", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "用户名", "GUID": "cb83f460-0a24-4f8c-8b34-791984246e2b" }, "ColumnName": "用户名" }, { "GUID": "e4f5c193-f005-4a55-baa7-caa38b82dec0", "BindingInfo": { "TableName": "用户信息视图", "ColumnName": "全名", "GUID": "92ccdb26-a718-4d80-bef6-9ed36c5a701c" }, "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": "84b3ab71967c4735889755aac5eaf46d" }, { "$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": "=用户名" }, "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": "b961632e-9cdd-48ce-b57f-e30e59833172" }, { "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": "ec4555e6-d7f1-4263-9dcc-aa6c3fc93535" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"当前钉钉账号已被\"&已有用户.全名&\"的账号绑定,请先解绑后再试!\"" }, "CustomReturns": [ { "ReturnPropertyName": "UnionId" } ] } ], "ID": "d1739660-72ff-4779-b53a-c7b995dc3086" } ] } ], "ID": "55264eed-1731-4cbd-8988-61cb8c24111d" } ] } ], "ID": "7aad1b9f-da32-452d-b850-85df08483cb4" }, { "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": "34ad4114-10c7-400e-8a20-e32f5ed533c3" } ] } ], "ReturnProperties": [ { "Name": "UnionId" } ] }