Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server
正在显示
3 个修改的文件
包含
35 行增加
和
0 行删除
| @@ -126,4 +126,14 @@ class GeoQuestionController extends BaseController | @@ -126,4 +126,14 @@ class GeoQuestionController extends BaseController | ||
| 126 | $data = $this->logic->delGeoQuestion(); | 126 | $data = $this->logic->delGeoQuestion(); |
| 127 | $this->response('success',Code::SUCCESS,$data); | 127 | $this->response('success',Code::SUCCESS,$data); |
| 128 | } | 128 | } |
| 129 | + | ||
| 130 | + public function unHitQuestionList(){ | ||
| 131 | + $this->request->validate([ | ||
| 132 | + 'project_id'=>'required', | ||
| 133 | + ],[ | ||
| 134 | + 'project_id.required' => '项目ID不能为空', | ||
| 135 | + ]); | ||
| 136 | + $data = $this->logic->getUnHitQuestionList(); | ||
| 137 | + $this->response('success',Code::SUCCESS,$data); | ||
| 138 | + } | ||
| 129 | } | 139 | } |
| @@ -12,6 +12,7 @@ namespace App\Http\Logic\Aside\Geo; | @@ -12,6 +12,7 @@ namespace App\Http\Logic\Aside\Geo; | ||
| 12 | use App\Http\Logic\Aside\BaseLogic; | 12 | use App\Http\Logic\Aside\BaseLogic; |
| 13 | use App\Models\Geo\GeoPlatform; | 13 | use App\Models\Geo\GeoPlatform; |
| 14 | use App\Models\Geo\GeoQuestion; | 14 | use App\Models\Geo\GeoQuestion; |
| 15 | +use App\Models\Geo\GeoQuestionResult; | ||
| 15 | use App\Models\Project\Project; | 16 | use App\Models\Project\Project; |
| 16 | 17 | ||
| 17 | class GeoQuestionLogic extends BaseLogic | 18 | class GeoQuestionLogic extends BaseLogic |
| @@ -135,4 +136,27 @@ class GeoQuestionLogic extends BaseLogic | @@ -135,4 +136,27 @@ class GeoQuestionLogic extends BaseLogic | ||
| 135 | $data = $this->model->del(['id'=>['in',$this->param['ids']]]); | 136 | $data = $this->model->del(['id'=>['in',$this->param['ids']]]); |
| 136 | return $this->success($data); | 137 | return $this->success($data); |
| 137 | } | 138 | } |
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 获取未名字的问题列表 | ||
| 142 | + * @return array | ||
| 143 | + * @author Akun | ||
| 144 | + * @date 2025/11/25 16:44 | ||
| 145 | + */ | ||
| 146 | + public function getUnHitQuestionList(){ | ||
| 147 | + $data = GeoQuestionResult::where('project_id',$this->param['project_id'])->where('hit',0)->pluck('platform','question')->toArray(); | ||
| 148 | + $list = []; | ||
| 149 | + if(!empty($data)){ | ||
| 150 | + $question_list = []; | ||
| 151 | + foreach ($data as $key => $item){ | ||
| 152 | + if(in_array($key,$question_list)){ | ||
| 153 | + array_push($list[$key],$item); | ||
| 154 | + }else{ | ||
| 155 | + $list[$key] = $item; | ||
| 156 | + $question_list[] = $key; | ||
| 157 | + } | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | + return $this->success($data); | ||
| 161 | + } | ||
| 138 | } | 162 | } |
| @@ -574,6 +574,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -574,6 +574,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 574 | Route::any('/getGeoQuestionList', [Aside\Geo\GeoQuestionController::class, 'getGeoQuestionList'])->name('admin.geo_question_getGeoQuestionList'); | 574 | Route::any('/getGeoQuestionList', [Aside\Geo\GeoQuestionController::class, 'getGeoQuestionList'])->name('admin.geo_question_getGeoQuestionList'); |
| 575 | Route::any('/saveGeoQuestion', [Aside\Geo\GeoQuestionController::class, 'saveGeoQuestion'])->name('admin.geo_question_saveGeoQuestion'); | 575 | Route::any('/saveGeoQuestion', [Aside\Geo\GeoQuestionController::class, 'saveGeoQuestion'])->name('admin.geo_question_saveGeoQuestion'); |
| 576 | Route::any('/delGeoQuestion', [Aside\Geo\GeoQuestionController::class, 'delGeoQuestion'])->name('admin.geo_question_delGeoQuestion'); | 576 | Route::any('/delGeoQuestion', [Aside\Geo\GeoQuestionController::class, 'delGeoQuestion'])->name('admin.geo_question_delGeoQuestion'); |
| 577 | + Route::any('/unHitQuestionList', [Aside\Geo\GeoQuestionController::class, 'unHitQuestionList'])->name('admin.geo_question_unHitQuestionList'); | ||
| 577 | }); | 578 | }); |
| 578 | //文章列表 | 579 | //文章列表 |
| 579 | Route::prefix('article')->group(function () { | 580 | Route::prefix('article')->group(function () { |
-
请 注册 或 登录 后发表评论