GeoQuestionResController.php
3.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* @remark :
* @name :GeoQuestionResController.php
* @author :lyh
* @method :post
* @time :2025/7/4 9:37
*/
namespace App\Http\Controllers\Bside\Geo;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\Geo\GeoQuestionResLogic;
use App\Models\Geo\GeoPlatform;
use App\Models\Geo\GeoQuestion;
use Illuminate\Http\Request;
/**
* @remark :请求数据结果
* @name :GeoQuestionResController
* @author :lyh
* @method :post
* @time :2025/7/4 9:37
*/
class GeoQuestionResController extends BaseController
{
public function __construct(Request $request)
{
parent::__construct($request);
$this->logic = new GeoQuestionResLogic();
}
/**
* @remark :获取类型
* @name :getType
* @author :lyh
* @method :post
* @time :2025/7/3 10:47
*/
public function getType(){
$questionModel = new GeoQuestion();
$data['type'] = $questionModel->brandType();
$geoPlatformModel = new GeoPlatform();
$data['platform'] = $geoPlatformModel->getList();
return $this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取统计数据
* @name :getCount
* @author :lyh
* @method :post
* @time :2025/7/8 17:18
*/
public function getCount(){
$data = $this->logic->getCount();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取列表数据
* @name :getList
* @author :lyh
* @method :post
* @time :2025/7/4 9:38
*/
public function getList(){
$this->request->validate([
'project_id'=>'required',
'type'=>'required'
],[
'project_id.required' => 'project_id不能为空',
'type.required' => '品牌类型不能为空'
]);
$data = $this->logic->getResultList($this->map,$this->page,$this->row,$this->order,$this->param['sort'] ?? 'desc');
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :
* @name :getInfo
* @author :lyh
* @method :post
* @time :2025/7/4 9:38
*/
public function getInfo(){
$this->request->validate([
'id'=>'required',
],[
'id.required' => 'id不能为空',
]);
$data = $this->logic->getResultInfo();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :统计数量
* @name :countQuantity
* @author :lyh
* @method :post
* @time :2025/7/21 10:58
*/
public function countQuantity(){
$data = $this->logic->countQuantity();
$data['platform'] = $this->logic->platformHitCount();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取搜索时间
* @name :getSearchDate
* @author :lyh
* @method :post
* @time :2025/7/21 16:35
*/
public function getSearchDate(){
$data = $this->logic->getSearchDate();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取当前项目所有标签
* @name :getLabel
* @author :lyh
* @method :post
* @time :2025/8/19 16:39
*/
public function getLabel(){
$data = $this->logic->getLabelData();
$this->response('success',Code::SUCCESS,$data);
}
}