DeptLogic.php 1.2 KB
<?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);
    }


}