|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Aside\Projects;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Projects\ProjectsLogic;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :谷歌流量系统
|
|
|
|
* @class :ProjectsController.php
|
|
|
|
* @author :lyh
|
|
|
|
* @time :2023/7/11 9:46
|
|
|
|
*/
|
|
|
|
class ProjectsController extends BaseController
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @remark :流量系统列表
|
|
|
|
* @name :lists
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/11 9:52
|
|
|
|
*/
|
|
|
|
public function lists(ProjectsLogic $projectsLogic){
|
|
|
|
//域名搜索
|
|
|
|
if(isset($this->map['domain']) && !empty($this->map['domain'])){
|
|
|
|
$this->map['domain'] = ['like',','.$this->map['domain'].','];
|
|
|
|
}
|
|
|
|
$lists = $projectsLogic->projectsLists($this->map,$this->page,$this->row,$this->order);
|
|
|
|
$this->response('success',Code::SUCCESS,$lists);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :编辑谷歌流量系统
|
|
|
|
* @name :save
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/11 9:53
|
|
|
|
*/
|
|
|
|
public function save(ProjectsLogic $projectsLogic){
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>'required'
|
|
|
|
],[
|
|
|
|
'id.required' => 'ID不能为空'
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
$projectsLogic->projectsSave();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除记录
|
|
|
|
* @name :del
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/11 9:53
|
|
|
|
*/
|
|
|
|
public function del(ProjectsLogic $projectsLogic){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>'required'
|
|
|
|
],[
|
|
|
|
'id.required' => 'ID不能为空'
|
|
|
|
]);
|
|
|
|
$projectsLogic->projectsDel();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|