简要描述:

  • 搜索部门及成员(公用)

请求域名:

  • https://dev8.yunzmall.com/business/1/

请求URL:

GET/plugin/project-manager/index/searchDepartmentStaff

参数:

参数名 是否必须 类型 说明
keyword string 搜索条件

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "",
	"data": {
		"list": [
			{
				"id": 57,
				"name": "子部门1",
				"parent_id": 51,
				"type": "department",
				"has_may_department_staff": [
					{
						"id": 90,
						"department_id": 57,
						"staff_id": 72,
						"has_one_staff": {
							"id": 72,
							"name": "韦安",
							"user_id": "ZhiHaoLeWoDuoNianDe",
							"uid": 164631,
							"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
							"userid": "ZhiHaoLeWoDuoNianDe",
							"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
						}
					}
				],
				"staff": [
					{
						"id": 72,
						"name": "韦安",
						"user_id": "ZhiHaoLeWoDuoNianDe",
						"uid": 164631,
						"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
						"userid": "ZhiHaoLeWoDuoNianDe",
						"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
						"type": "staff"
					}
				]
			},
			{
				"id": 43,
				"name": "子部门2",
				"parent_id": 41,
				"type": "department",
				"has_may_department_staff": [
					{
						"id": 86,
						"department_id": 43,
						"staff_id": 71,
						"has_one_staff": {
							"id": 71,
							"name": "柏丽芬",
							"user_id": "KaKa",
							"uid": 164913,
							"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
							"userid": "KaKa",
							"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0"
						}
					},
					{
						"id": 98,
						"department_id": 43,
						"staff_id": 79,
						"has_one_staff": {
							"id": 79,
							"name": "许家健233",
							"user_id": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
							"uid": 163777,
							"avatar": "",
							"userid": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
							"avatar_mediaid": ""
						}
					},
					{
						"id": 99,
						"department_id": 43,
						"staff_id": 80,
						"has_one_staff": {
							"id": 80,
							"name": "human",
							"user_id": "HUMAN_1632464463",
							"uid": 0,
							"avatar": "",
							"userid": "HUMAN_1632464463",
							"avatar_mediaid": ""
						}
					},
					{
						"id": 103,
						"department_id": 43,
						"staff_id": 81,
						"has_one_staff": {
							"id": 81,
							"name": "嗨",
							"user_id": "HAI_1634278023",
							"uid": 0,
							"avatar": "",
							"userid": "HAI_1634278023",
							"avatar_mediaid": ""
						}
					}
				],
				"staff": [
					{
						"id": 71,
						"name": "柏丽芬",
						"user_id": "KaKa",
						"uid": 164913,
						"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
						"userid": "KaKa",
						"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
						"type": "staff"
					},
					{
						"id": 79,
						"name": "许家健233",
						"user_id": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
						"uid": 163777,
						"avatar": "",
						"userid": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
						"avatar_mediaid": "",
						"type": "staff"
					},
					{
						"id": 80,
						"name": "human",
						"user_id": "HUMAN_1632464463",
						"uid": 0,
						"avatar": "",
						"userid": "HUMAN_1632464463",
						"avatar_mediaid": "",
						"type": "staff"
					},
					{
						"id": 81,
						"name": "嗨",
						"user_id": "HAI_1634278023",
						"uid": 0,
						"avatar": "",
						"userid": "HAI_1634278023",
						"avatar_mediaid": "",
						"type": "staff"
					}
				]
			},
			{
				"id": 53,
				"name": "子部门2-1",
				"parent_id": 44,
				"type": "department",
				"has_may_department_staff": [
					{
						"id": 91,
						"department_id": 53,
						"staff_id": 72,
						"has_one_staff": {
							"id": 72,
							"name": "韦安",
							"user_id": "ZhiHaoLeWoDuoNianDe",
							"uid": 164631,
							"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
							"userid": "ZhiHaoLeWoDuoNianDe",
							"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
						}
					}
				],
				"staff": [
					{
						"id": 72,
						"name": "韦安",
						"user_id": "ZhiHaoLeWoDuoNianDe",
						"uid": 164631,
						"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
						"userid": "ZhiHaoLeWoDuoNianDe",
						"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
						"type": "staff"
					}
				]
			},
			{
				"id": 49,
				"name": "子部门2-22",
				"parent_id": 43,
				"type": "department",
				"has_may_department_staff": [
					{
						"id": 97,
						"department_id": 49,
						"staff_id": 78,
						"has_one_staff": {
							"id": 78,
							"name": "许家健",
							"user_id": "YeSeChuMingShi",
							"uid": 0,
							"avatar": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0",
							"userid": "YeSeChuMingShi",
							"avatar_mediaid": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0"
						}
					}
				],
				"staff": [
					{
						"id": 78,
						"name": "许家健",
						"user_id": "YeSeChuMingShi",
						"uid": 0,
						"avatar": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0",
						"userid": "YeSeChuMingShi",
						"avatar_mediaid": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0",
						"type": "staff"
					}
				]
			},
			{
				"id": 50,
				"name": "子部门2-3",
				"parent_id": 43,
				"type": "department",
				"has_may_department_staff": [],
				"staff": []
			}
		],
		"staff": []
	}
}

错误时返回:

{
  "result": 0,
  "msg": "",
  "data": []
}

list返回参数说明:部门列表信息

参数名 类型 说明
name string 部门名称
staff array 部门成员信息数组
children array 子部门数据(与父级数据结构一致)

list.staff返回参数说明:部门成员列表信息

参数名 类型 说明
id int 成员id(一般选择传这个id)
name string 成员名称
user_id string 成员user_id
avatar string 成员头像

staff返回参数说明:成员列表信息

参数名 类型 说明
id int 成员id(一般选择传这个id)
name string 成员名称
user_id string 成员user_id
avatar string 成员头像