DeptLogic.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace App\Http\Logic\Aside\User;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\User\ProjectDept;
class DeptLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new ProjectDept();
$this->param = $this->requestAll;
}
/**
* @remark :Dept组织架构列表
* @name :DeptLists
* @author :lyh
* @method :post
* @time :2023/6/21 14:56
*/
public function DeptLists($map,$page,$row,$order = 'created_at'){
$filed = ['id','pid','title','sort','created_at','remark'];
$lists = $this->model->lists($map,$page,$row,$order,$filed);
return $this->success($lists);
}
/**
* @remark :组织架构详情
* @name :DeptRead
* @author :lyh
* @method :post
* @time :2023/6/21 15:01
*/
public function DeptRead(){
$filed = ['id','pid','title','sort','created_at','remark'];
$info = $this->model->read($this->param,$filed);
if($info === false){
$this->fail('当前数据不存在,或者被删除');
}
return $this->success($info);
}
}