Commit 6de0b9f3 authored by 王源's avatar 王源 🎧

添加判断用户是否属于某个部门

parent 012667a2
<?php
/**
* Created by PhpStorm.
* User: Zero
* Time: 2020/10/27 9:21
*/
namespace Meibuyu\Micro\Constants;
class Department
{
const HR = 18;
}
......@@ -121,4 +121,14 @@ interface UserServiceInterface
*/
public function getDirectLeadersByIds($userIds);
/**
* 判断用户是否属于某个部门
* @param mixed $userId 用户id
* @param mixed $deptId 部门id,判断多个部门传数组
* @param bool $withChildren 是否包含子部门,默认false
* @return bool
* @author Zero
*/
public function belongToDepartments($userId, $deptId, $withChildren = false): bool;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment