{"Message":"增加钉钉SDK插件,准备进行授权测试","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/个人中心-基本信息"},{"State":1,"Type":16,"Name":"TaskScheduler/应用启动时"},{"State":1,"Type":8,"Name":"ApplicationSetting"},{"State":1,"Type":40,"Name":"Plugin"},{"State":3,"Type":20,"Name":"ServerCommands/钉钉"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/初始化钉钉配置"},{"State":3,"Type":15,"Name":"ServerCommand/通过免登码获取用户信息"},{"State":3,"Type":27,"Name":"ServerCommandPrivate/通过免登码获取用户信息"},{"State":3,"Type":15,"Name":"ServerCommand/绑定钉钉UnionId"},{"State":3,"Type":15,"Name":"ServerCommand/获取CorpId"},{"State":3,"Type":15,"Name":"ServerCommand/解绑钉钉"}],"Version":"v1"}
This commit is contained in:
43
ServerCommands/钉钉/初始化钉钉配置.json
Normal file
43
ServerCommands/钉钉/初始化钉钉配置.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"Name": "初始化钉钉配置",
|
||||
"Enabled": true,
|
||||
"Triggers": [
|
||||
{
|
||||
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon"
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
|
||||
"JsonString": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=全局_钉钉"
|
||||
},
|
||||
"SampleJson": "{\r\n \"corpId\": \"ding0cec4a8a821681c135c2f4657eb6378f\",\r\n \"AgentId\": \"3174653522\",\r\n \"AppKey\": \"dingus6w0kbp5wgiiepu\",\r\n \"AppSecret\": \"2nbEQx6wUWlSm1l1mzkVEvf0TWO77tQM7Thj7OycnOVK7UQWhrI4U717WgWTTGXg\"\r\n}",
|
||||
"ToParameter": "钉钉配置"
|
||||
},
|
||||
{
|
||||
"$type": "DingTalkPlugin.Init, DingTalkPlugin",
|
||||
"AppID": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.AgentId"
|
||||
},
|
||||
"CorpId": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.corpId"
|
||||
},
|
||||
"AgentId": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.AgentId"
|
||||
},
|
||||
"AppKey": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.AppKey"
|
||||
},
|
||||
"AppSecret": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.AppSecret"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
271
ServerCommands/钉钉/绑定钉钉UnionId.json
Normal file
271
ServerCommands/钉钉/绑定钉钉UnionId.json
Normal file
@@ -0,0 +1,271 @@
|
||||
{
|
||||
"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": "cdcc7c8debd74ec9b3b021ec1c7fb4bd"
|
||||
},
|
||||
{
|
||||
"$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": "UserManagementCommands.Commands.UpdateUserCommand, UserManagementCommands",
|
||||
"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": "ee0ce6a3-05bc-499a-a307-f536cbfb0fca"
|
||||
},
|
||||
{
|
||||
"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": "046db854-37fb-4bf0-a918-dbd7da13b032"
|
||||
},
|
||||
{
|
||||
"CommandList": [
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=\"当前钉钉账号已被\"&已有用户.全名&\"的账号绑定,请先解绑后再试!\""
|
||||
},
|
||||
"CustomReturns": [
|
||||
{
|
||||
"ReturnPropertyName": "UnionId"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "12186e8d-a6d2-4377-9486-2b457b0c3ccc"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "aea4e1d0-e4e1-4ae5-b192-fc1ad762c08a"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ID": "940f7a89-7f9e-4d3f-ab90-2754c9dba2a2"
|
||||
},
|
||||
{
|
||||
"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": "d30a406a-69e7-4cd8-a891-7c6877a87f81"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ReturnProperties": [
|
||||
{
|
||||
"Name": "UnionId"
|
||||
}
|
||||
]
|
||||
}
|
||||
55
ServerCommands/钉钉/获取CorpId.json
Normal file
55
ServerCommands/钉钉/获取CorpId.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"Name": "获取CorpId",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "JsonUtilityCommand.JsonDeserializeCommand, JsonUtilityCommand",
|
||||
"JsonString": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=全局_钉钉"
|
||||
},
|
||||
"SampleJson": "{\r\n \"corpId\": \"ding0cec4a8a821681c135c2f4657eb6378f\",\r\n \"AgentId\": \"3174653522\",\r\n \"AppKey\": \"dingus6w0kbp5wgiiepu\",\r\n \"AppSecret\": \"2nbEQx6wUWlSm1l1mzkVEvf0TWO77tQM7Thj7OycnOVK7UQWhrI4U717WgWTTGXg\"\r\n}",
|
||||
"ToParameter": "钉钉配置"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": "获取成功",
|
||||
"CustomReturns": [
|
||||
{
|
||||
"ReturnPropertyName": "CorpId",
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=钉钉配置.corpId"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ReturnProperties": [
|
||||
{
|
||||
"Name": "CorpId"
|
||||
}
|
||||
]
|
||||
}
|
||||
60
ServerCommands/钉钉/解绑钉钉.json
Normal file
60
ServerCommands/钉钉/解绑钉钉.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"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_LoginUser"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "用户名",
|
||||
"DataValidationInfo": {
|
||||
"IgnoreBlank": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$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": "=\"\""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": "解绑成功"
|
||||
}
|
||||
]
|
||||
}
|
||||
46
ServerCommands/钉钉/通过免登码获取用户信息.json
Normal file
46
ServerCommands/钉钉/通过免登码获取用户信息.json
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Name": "通过免登码获取用户信息",
|
||||
"Enabled": true,
|
||||
"Triggers": [
|
||||
{
|
||||
"$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon",
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "AuthCode",
|
||||
"DataValidationInfo": {
|
||||
"IgnoreBlank": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Commands": [
|
||||
{
|
||||
"$type": "DingTalkPlugin.Getuserinfo, DingTalkPlugin",
|
||||
"Code": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=AuthCode"
|
||||
},
|
||||
"UserInfo": "用户信息"
|
||||
},
|
||||
{
|
||||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||||
"ErrorCode": "0",
|
||||
"Message": "获取成功",
|
||||
"CustomReturns": [
|
||||
{
|
||||
"ReturnPropertyName": "钉钉UnionId",
|
||||
"Value": {
|
||||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||||
"SerializeProperty": "=用户信息.unionid"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ReturnProperties": [
|
||||
{
|
||||
"Name": "钉钉UnionId"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user