56 lines
965 B
PHP
56 lines
965 B
PHP
<?php
|
|
|
|
namespace app\common\service;
|
|
|
|
use app\common\logic\RoleLogic;
|
|
|
|
class RoleService
|
|
{
|
|
protected $roleLogic;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->roleLogic = (new RoleLogic());
|
|
}
|
|
|
|
/**
|
|
* 获取角色列表
|
|
*/
|
|
public function getRoleList(array $params)
|
|
{
|
|
return $this->roleLogic->getRoleList($params);
|
|
}
|
|
|
|
/**
|
|
* 获取角色详情
|
|
*/
|
|
public function getRoleDetail(int $roleId)
|
|
{
|
|
return $this->roleLogic->getRoleDetail($roleId);
|
|
}
|
|
|
|
/**
|
|
* 创建角色
|
|
*/
|
|
public function createRole(array $data)
|
|
{
|
|
return $this->roleLogic->createRole($data);
|
|
}
|
|
|
|
/**
|
|
* 更新角色
|
|
*/
|
|
public function updateRole(array $data)
|
|
{
|
|
return $this->roleLogic->updateRole($data);
|
|
}
|
|
|
|
/**
|
|
* 删除角色
|
|
*/
|
|
public function deleteRole(int $roleId)
|
|
{
|
|
return $this->roleLogic->deleteRole($roleId);
|
|
}
|
|
}
|