作者 赵彬吉

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -2,7 +2,9 @@
namespace App\Http\Controllers\Aside\User;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Http\Logic\Aside\User\DeptLogic;
/**
* @remark :b端用户组织架构
... ... @@ -18,8 +20,9 @@ class ProjectDeptController extends BaseController
* @method :post
* @time :2023/6/17 16:13
*/
public function lists(){
public function lists(DeptLogic $deptLogic){
$lists = $deptLogic->DeptLists($this->map,$this->page,$this->row,$this->order);
$this->response('success',Code::SUCCESS,$lists);
}
/**
... ... @@ -28,8 +31,14 @@ class ProjectDeptController extends BaseController
* @method :post
* @time :2023/6/17 16:13
*/
public function read(){
public function read(DeptLogic $deptLogic){
$this->request->validate([
'id'=>'required'
],[
'id.required' => 'ID不能为空'
]);
$info = $deptLogic->DeptRead();
$this->response('success',Code::SUCCESS,$info);
}
}
... ...
<?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 = ['*']){
$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(){
$info = $this->model->read($this->param);
if($info === false){
$this->fail('当前数据不存在,或者被删除');
}
return $this->success($info);
}
}
... ...