Files
clue/ServerCommands/钉钉/dingtalkLogin.json

224 lines
7.6 KiB
JSON

{
"Name": "dingtalkLogin",
"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": "authCode",
"DataValidationInfo": {
"IgnoreBlank": false
}
},
{
"Name": "state",
"DataValidationInfo": {}
}
]
}
],
"Commands": [
{
"$type": "DingTalkPlugin.GetUserToken, DingTalkPlugin",
"Code": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=authCode"
},
"ResultTo": "Result"
},
{
"$type": "DingTalkPlugin.GetUserWithOptions, DingTalkPlugin",
"Token": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Result.AccessToken"
},
"UnionId": "me",
"ResultTo": "个人信息"
},
{
"$type": "DingTalkPlugin.Getbyunionid, DingTalkPlugin",
"UserName": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=个人信息.UnionId"
},
"UserId": "UserId"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "查找用户",
"TableValue": {
"TableName": "用户信息视图",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "c5496bba-4833-4374-b4c5-9d45c1e8d3dc",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "1f400365-2901-41d6-a354-c6ebb1a6a41f"
},
"ColumnName": "用户名"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "DingTalkUnionID",
"GUID": "8f9a3983-cded-410b-b825-8c5094d18049"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=个人信息.UnionId"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "a41b2b5a302041d8bd180ebf72771907"
},
{
"$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": "=个人信息.Nick"
},
"Email": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=个人信息.Email"
},
"ExtendedProperties": [
{
"Name": "DingTalkUnionID",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=个人信息.UnionId"
}
},
{
"Name": "DingTalkUserID",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=UserId"
}
}
]
}
},
{
"$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"
}
},
{
"ReturnPropertyName": "userid",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=UserId"
}
}
]
}
],
"ID": "b1085d32-6bc8-41d3-8c00-a3ba9e029808"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "请先绑定账号后登录",
"CustomReturns": [
{
"ReturnPropertyName": "unionid",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=个人信息.UnionId"
}
},
{
"ReturnPropertyName": "userid",
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=UserId"
}
}
]
}
],
"ID": "dcfffb6e-bed8-4b6d-ac4f-9906879c69a2"
}
]
}
],
"ReturnProperties": [
{
"Name": "unionid"
},
{
"Name": "userid"
}
]
}