合并分支 'lyh-server' 到 'master'
geo方案设置label 查看合并请求 !2620
正在显示
4 个修改的文件
包含
39 行增加
和
0 行删除
| @@ -61,6 +61,15 @@ class RenewProjectController extends BaseController | @@ -61,6 +61,15 @@ class RenewProjectController extends BaseController | ||
| 61 | if(!empty($param['search']) && !empty($param['search_type'])){ | 61 | if(!empty($param['search']) && !empty($param['search_type'])){ |
| 62 | $map[$this->param['search_type']] = ['like', "%{$this->param['search']}%"]; | 62 | $map[$this->param['search_type']] = ['like', "%{$this->param['search']}%"]; |
| 63 | } | 63 | } |
| 64 | + if(isset($param['zone_id']) && !empty($param['zone_id'])){ | ||
| 65 | + $map['channel'] = ['like','%"zone_id": "'.$this->map['zone_id'].'"%']; | ||
| 66 | + } | ||
| 67 | + if(isset($param['channel_id']) && !empty($param['channel_id'])){ | ||
| 68 | + $map['channel'] = ['like','%"channel_id": "'.$this->map['channel_id'].'"%']; | ||
| 69 | + } | ||
| 70 | + if(isset($param['user_id']) && !empty($param['user_id'])){ | ||
| 71 | + $map['channel'] = ['like','%"user_id": "'.$this->map['user_id'].'"%']; | ||
| 72 | + } | ||
| 64 | //按类型搜索 | 73 | //按类型搜索 |
| 65 | $map['delete_status'] = 0; | 74 | $map['delete_status'] = 0; |
| 66 | if(empty($param['type'])){ | 75 | if(empty($param['type'])){ |
| @@ -117,4 +117,16 @@ class GeoQuestionResController extends BaseController | @@ -117,4 +117,16 @@ class GeoQuestionResController extends BaseController | ||
| 117 | $data = $this->logic->getSearchDate(); | 117 | $data = $this->logic->getSearchDate(); |
| 118 | $this->response('success',Code::SUCCESS,$data); | 118 | $this->response('success',Code::SUCCESS,$data); |
| 119 | } | 119 | } |
| 120 | + | ||
| 121 | + /** | ||
| 122 | + * @remark :获取当前项目所有标签 | ||
| 123 | + * @name :getLabel | ||
| 124 | + * @author :lyh | ||
| 125 | + * @method :post | ||
| 126 | + * @time :2025/8/19 16:39 | ||
| 127 | + */ | ||
| 128 | + public function getLabel(){ | ||
| 129 | + $data = $this->logic->getLabelData(); | ||
| 130 | + $this->response('success',Code::SUCCESS,$data); | ||
| 131 | + } | ||
| 120 | } | 132 | } |
| @@ -144,4 +144,21 @@ class GeoQuestionResLogic extends BaseLogic | @@ -144,4 +144,21 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 144 | return $this->success($dates); | 144 | return $this->success($dates); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | + /** | ||
| 148 | + * @remark :获取标签列表 | ||
| 149 | + * @name :getLabelData | ||
| 150 | + * @author :lyh | ||
| 151 | + * @method :post | ||
| 152 | + * @time :2025/8/19 16:42 | ||
| 153 | + */ | ||
| 154 | + public function getLabelData(){ | ||
| 155 | + $questionModel = new GeoQuestion(); | ||
| 156 | + $labelArr = $questionModel->getValue(['project_id'=>$this->user['project_id']],'label'); | ||
| 157 | + $data = []; | ||
| 158 | + foreach ($labelArr as $item){ | ||
| 159 | + $arr = explode("\r\n",$item); | ||
| 160 | + $data = array_values(array_unique(array_merge($arr,$data))); | ||
| 161 | + } | ||
| 162 | + return $this->success($data); | ||
| 163 | + } | ||
| 147 | } | 164 | } |
| @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 754 | Route::prefix('geo_result')->group(function () { | 754 | Route::prefix('geo_result')->group(function () { |
| 755 | Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList'); | 755 | Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList'); |
| 756 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); | 756 | Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo'); |
| 757 | + Route::any('/getLabel', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getLabel'])->name('geo_result_getLabel'); | ||
| 757 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 | 758 | Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型 |
| 758 | Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量 | 759 | Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量 |
| 759 | Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计 | 760 | Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计 |
-
请 注册 或 登录 后发表评论