Commit eb59e625 authored by 梁俊杰's avatar 梁俊杰

Merge branch 'master' of 39.100.151.123:hwq/micro

parents 134bcef5 fc68f960
<?php
/**
* Created by PhpStorm.
* User: 王源
* Date: 2020/1/9
* Time: 15:07
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface BaseInfoServiceInterface
{
/**
* 通过单个id获取岗位数组
* @param int $id
* @param array $columns
* @param array $relations
* @return array
*/
public function getPositionListById(int $id, array $columns = ['*'], array $relations = []): array;
/**
* 通过id数组获取国家数组
* @param array $idList
* @param array $columns
* @return array
*/
public function getCountryListByIdList(array $idList, array $columns = ['*']): array;
}
......@@ -22,6 +22,7 @@ interface UserServiceInterface
* 通过id列表获取用户数组
* @param array $idList
* @param array $columns
* @param array $relations 可传入['team', 'department', 'position'],分别是团队,部门和岗位
* @return mixed
*/
public function getByIdList(array $idList, array $columns = ['*'], array $relations = []);
......@@ -37,7 +38,7 @@ interface UserServiceInterface
/**
* 获取用户拥有某个应用的所有权限
* @param int $userId
* @param string $appName 为空获取全部权限
* @param string $appName 当前系统名称,为空获取全部权限
* @return array
*/
public function getPerms(int $userId, string $appName = null): array;
......
......@@ -387,3 +387,13 @@ if (!function_exists('num_2_file_size')) {
return number_format($num, 2) . ' ' . $format;
}
}
if (!function_exists('select_id_name')) {
function select_id_name($columns = [])
{
$columns = array_merge(['id', 'name'], $columns);
return function ($q) use ($columns) {
$q->select($columns);
};
}
}
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