硕顺crm后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1011 B

<?php
namespace WeWork\Api;
use WeWork\Traits\HttpClientTrait;
class Department
{
use HttpClientTrait;
/**
* 创建部门
*
* @param array $json
* @return array
*/
public function create(array $json): array
{
return $this->httpClient->postJson('department/create', $json);
}
/**
* 更新部门
*
* @param array $json
* @return array
*/
public function update(array $json): array
{
return $this->httpClient->postJson('department/update', $json);
}
/**
* 删除部门
*
* @param int $id
* @return array
*/
public function delete(int $id): array
{
return $this->httpClient->get('department/delete', compact('id'));
}
/**
* 获取部门列表
*
* @param int $id
* @return array
*/
public function list(int $id = 0): array
{
return $this->httpClient->get('department/list', $id > 0 ? compact('id') : []);
}
}