Files
wh-api/app/JsonRpc/DeptServiceConsumer.php
ykxiao 0567eda8ca
Some checks failed
Build Docker / build (push) Has been cancelled
增加部门管理接口
2025-07-14 14:37:32 +08:00

77 lines
1.6 KiB
PHP

<?php
/**
* Author: ykxiao
* Date: 2025/7/14
* Time: 下午2:04
* Description:
*
* (c) ykxiao <yk_9001@hotmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
declare(strict_types=1);
namespace App\JsonRpc;
use Hyperf\Di\Annotation\Inject;
use Hyperf\RpcClient\AbstractServiceClient;
class DeptServiceConsumer extends AbstractServiceClient implements DeptServiceInterface
{
#[Inject]
protected DeptServiceInterface $deptServiceInterface;
protected string $serviceName = 'DeptService';
protected string $protocol = 'jsonrpc-http';
/**
* @inheritDoc
*/
public function addDept(array $data): array
{
return $this->__request(__FUNCTION__, compact('data'));
}
/**
* @inheritDoc
*/
public function delDept(array $params): array
{
return $this->__request(__FUNCTION__, compact('params'));
}
/**
* @inheritDoc
*/
public function getDeptInfo(array $params = []): array
{
return $this->__request(__FUNCTION__, compact('params'));
}
/**
* @inheritDoc
*/
public function deptList(array $params = []): array
{
return $this->__request(__FUNCTION__, compact('params'));
}
/**
* @inheritDoc
*/
public function getActiveDeptList(array $params = []): array
{
return $this->__request(__FUNCTION__, compact('params'));
}
/**
* @inheritDoc
*/
public function updateDeptStatus(array $data): array
{
return $this->__request(__FUNCTION__, compact('data'));
}
}