AllProjectController.php
1.4 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
<?php
/**
* @remark :
* @name :AllProjectController.php
* @author :lyh
* @method :post
* @time :2024/11/12 9:34
*/
namespace App\Http\Controllers\Aside\Project;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Models\Domain\DomainInfo;
use App\Models\Project\CountAllProject;
/**
* @remark :统计所有项目(4.0,5.0,6.0)
* @name :AllProjectController
* @author :lyh
* @method :post
* @time :2024/11/12 9:34
*/
class AllProjectController extends BaseController
{
/**
* @remark :统计所有项目列表
* @name :lists
* @author :lyh
* @method :post
* @time :2024/11/12 9:35
*/
public function lists(CountAllProject $allProject){
if(isset($this->map['product_domain']) && !empty($this->map['product_domain'])){
$parsedUrl = parse_url($this->map['product_domain']);
$this->map['product_domain'] = $parsedUrl['host'] ?? $this->map['product_domain'];
$this->map['product_domain'] = ['like','%'.$this->map['product_domain'].'%'];
}
if(isset($this->map['test_domain']) && !empty($this->map['test_domain'])){
$this->map['test_domain'] = ['like','%'.$this->map['test_domain'].'%'];
}
$data = $allProject->lists($this->map,$this->page,$this->row);
$this->response('success',Code::SUCCESS,$data);
}
}