Merge remote-tracking branch 'origin/master' into akun
正在显示
6 个修改的文件
包含
47 行增加
和
3 行删除
| @@ -108,13 +108,16 @@ class GeoController extends BaseController | @@ -108,13 +108,16 @@ class GeoController extends BaseController | ||
| 108 | $token = trim($this->param['token']); | 108 | $token = trim($this->param['token']); |
| 109 | $data = GeoConfirm::where(['uniqid' => $token])->first(); | 109 | $data = GeoConfirm::where(['uniqid' => $token])->first(); |
| 110 | if (empty($data)){ | 110 | if (empty($data)){ |
| 111 | - return $this->error('当前授权已失效'); | 111 | + return $this->error('确认链接已重置,请查看最新推送链接!'); |
| 112 | } | 112 | } |
| 113 | $content = explode("\n", $data->content); | 113 | $content = explode("\n", $data->content); |
| 114 | $confirm = explode("\n", $data->confirm); | 114 | $confirm = explode("\n", $data->confirm); |
| 115 | $type = $data->type; | 115 | $type = $data->type; |
| 116 | $status = $data->status; | 116 | $status = $data->status; |
| 117 | - $result = compact('content', 'confirm', 'type', 'status'); | 117 | + $projectModel = new Project(); |
| 118 | + $projectInfo = $projectModel->read(['id' => $data->project_id],['title','version']); | ||
| 119 | + $project_title = $projectInfo['title'] ?? ''; | ||
| 120 | + $result = compact('content', 'confirm', 'type', 'status', 'project_title'); | ||
| 118 | $this->response('success',Code::SUCCESS,$result); | 121 | $this->response('success',Code::SUCCESS,$result); |
| 119 | } | 122 | } |
| 120 | 123 |
| @@ -68,4 +68,22 @@ class GeoController extends BaseController | @@ -68,4 +68,22 @@ class GeoController extends BaseController | ||
| 68 | $data = $this->logic->saveConfig($this->param); | 68 | $data = $this->logic->saveConfig($this->param); |
| 69 | $this->response('success', Code::SUCCESS, $data); | 69 | $this->response('success', Code::SUCCESS, $data); |
| 70 | } | 70 | } |
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * @remark :统计数据 | ||
| 74 | + * @name :getCount | ||
| 75 | + * @author :lyh | ||
| 76 | + * @method :post | ||
| 77 | + * @time :2025/10/30 10:37 | ||
| 78 | + */ | ||
| 79 | + public function getCount() | ||
| 80 | + { | ||
| 81 | + $this->request->validate([ | ||
| 82 | + 'project_id' => 'required', | ||
| 83 | + ], [ | ||
| 84 | + 'project_id.required' => '项目ID不能为空', | ||
| 85 | + ]); | ||
| 86 | + $data = $this->logic->getCount(); | ||
| 87 | + $this->response('success', Code::SUCCESS, $data); | ||
| 88 | + } | ||
| 71 | } | 89 | } |
| @@ -78,8 +78,10 @@ class SettingFaqController extends BaseController | @@ -78,8 +78,10 @@ class SettingFaqController extends BaseController | ||
| 78 | { | 78 | { |
| 79 | $this->request->validate([ | 79 | $this->request->validate([ |
| 80 | 'route'=>'required', | 80 | 'route'=>'required', |
| 81 | + 'qa'=>'required', | ||
| 81 | ],[ | 82 | ],[ |
| 82 | 'route.required' => '路由不能为空', | 83 | 'route.required' => '路由不能为空', |
| 84 | + 'qa.required' => 'qa不能为空', | ||
| 83 | ]); | 85 | ]); |
| 84 | $data = $this->logic->saveFaq(); | 86 | $data = $this->logic->saveFaq(); |
| 85 | $this->response('success',Code::SUCCESS,$data); | 87 | $this->response('success',Code::SUCCESS,$data); |
| @@ -40,7 +40,7 @@ class GeoConfirmLogic extends BaseLogic | @@ -40,7 +40,7 @@ class GeoConfirmLogic extends BaseLogic | ||
| 40 | public function saveConfirmContent($param) | 40 | public function saveConfirmContent($param) |
| 41 | { | 41 | { |
| 42 | try { | 42 | try { |
| 43 | - $info = $this->model->read(['project_id' => $param['project_id']]); | 43 | + $info = $this->model->read(['project_id' => $param['project_id'],'type' => $param['type']]); |
| 44 | if($info === false){ | 44 | if($info === false){ |
| 45 | $id = $this->model->addReturnId($param); | 45 | $id = $this->model->addReturnId($param); |
| 46 | }else{ | 46 | }else{ |
| @@ -9,8 +9,12 @@ | @@ -9,8 +9,12 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Http\Logic\Aside\Geo; | 10 | namespace App\Http\Logic\Aside\Geo; |
| 11 | 11 | ||
| 12 | +use App\Console\Commands\Geo\GeoQuestionRes; | ||
| 12 | use App\Http\Logic\Aside\BaseLogic; | 13 | use App\Http\Logic\Aside\BaseLogic; |
| 13 | use App\Models\Geo\GeoConf; | 14 | use App\Models\Geo\GeoConf; |
| 15 | +use App\Models\Geo\GeoLink; | ||
| 16 | +use App\Models\Geo\GeoQuestion; | ||
| 17 | +use App\Models\Geo\GeoWritings; | ||
| 14 | use App\Models\Manage\ManageHr; | 18 | use App\Models\Manage\ManageHr; |
| 15 | use App\Models\Project\KeywordPrefix; | 19 | use App\Models\Project\KeywordPrefix; |
| 16 | use App\Models\Project\Project; | 20 | use App\Models\Project\Project; |
| @@ -97,4 +101,20 @@ class GeoLogic extends BaseLogic | @@ -97,4 +101,20 @@ class GeoLogic extends BaseLogic | ||
| 97 | return $this->success(['id'=>$id]); | 101 | return $this->success(['id'=>$id]); |
| 98 | } | 102 | } |
| 99 | 103 | ||
| 104 | + /** | ||
| 105 | + * @remark :获取统计数据 | ||
| 106 | + * @name :getCount | ||
| 107 | + * @author :lyh | ||
| 108 | + * @method :post | ||
| 109 | + * @time :2025/10/30 10:39 | ||
| 110 | + */ | ||
| 111 | + public function getCount() | ||
| 112 | + { | ||
| 113 | + //获取问题数量 | ||
| 114 | + $geo_question_count = GeoQuestion::selectRaw('SUM(JSON_LENGTH(question)) as total_count')->where('project_id',$this->param['project_id'])->value('total_count'); | ||
| 115 | + $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count(); | ||
| 116 | + $geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count(); | ||
| 117 | + return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]); | ||
| 118 | + } | ||
| 119 | + | ||
| 100 | } | 120 | } |
| @@ -591,6 +591,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -591,6 +591,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 591 | Route::prefix('conf')->group(function () { | 591 | Route::prefix('conf')->group(function () { |
| 592 | Route::any('/getConfig', [Aside\Geo\GeoController::class, 'getConfig'])->name('admin.geo_conf_getConfig'); | 592 | Route::any('/getConfig', [Aside\Geo\GeoController::class, 'getConfig'])->name('admin.geo_conf_getConfig'); |
| 593 | Route::any('/saveConfig', [Aside\Geo\GeoController::class, 'saveConfig'])->name('admin.geo_conf_saveConfig'); | 593 | Route::any('/saveConfig', [Aside\Geo\GeoController::class, 'saveConfig'])->name('admin.geo_conf_saveConfig'); |
| 594 | + Route::any('/getCount', [Aside\Geo\GeoController::class, 'getCount'])->name('admin.geo_conf_getCount'); | ||
| 594 | }); | 595 | }); |
| 595 | //geo客户确认信息 | 596 | //geo客户确认信息 |
| 596 | Route::prefix('confirm')->group(function () { | 597 | Route::prefix('confirm')->group(function () { |
-
请 注册 或 登录 后发表评论