作者 李宇航

合并分支 'lyh-server' 到 'master'

geo方案设置label



查看合并请求 !2620
... ... @@ -61,6 +61,15 @@ class RenewProjectController extends BaseController
if(!empty($param['search']) && !empty($param['search_type'])){
$map[$this->param['search_type']] = ['like', "%{$this->param['search']}%"];
}
if(isset($param['zone_id']) && !empty($param['zone_id'])){
$map['channel'] = ['like','%"zone_id": "'.$this->map['zone_id'].'"%'];
}
if(isset($param['channel_id']) && !empty($param['channel_id'])){
$map['channel'] = ['like','%"channel_id": "'.$this->map['channel_id'].'"%'];
}
if(isset($param['user_id']) && !empty($param['user_id'])){
$map['channel'] = ['like','%"user_id": "'.$this->map['user_id'].'"%'];
}
//按类型搜索
$map['delete_status'] = 0;
if(empty($param['type'])){
... ...
... ... @@ -117,4 +117,16 @@ class GeoQuestionResController extends BaseController
$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);
}
}
... ...
... ... @@ -144,4 +144,21 @@ class GeoQuestionResLogic extends BaseLogic
return $this->success($dates);
}
/**
* @remark :获取标签列表
* @name :getLabelData
* @author :lyh
* @method :post
* @time :2025/8/19 16:42
*/
public function getLabelData(){
$questionModel = new GeoQuestion();
$labelArr = $questionModel->getValue(['project_id'=>$this->user['project_id']],'label');
$data = [];
foreach ($labelArr as $item){
$arr = explode("\r\n",$item);
$data = array_values(array_unique(array_merge($arr,$data)));
}
return $this->success($data);
}
}
... ...
... ... @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::prefix('geo_result')->group(function () {
Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList');
Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo');
Route::any('/getLabel', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getLabel'])->name('geo_result_getLabel');
Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型
Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量
Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计
... ...