正在显示
3 个修改的文件
包含
37 行增加
和
0 行删除
| @@ -71,4 +71,22 @@ class GeoConfirmController extends BaseController | @@ -71,4 +71,22 @@ class GeoConfirmController extends BaseController | ||
| 71 | $data = $this->logic->saveConfirmContent($this->param); | 71 | $data = $this->logic->saveConfirmContent($this->param); |
| 72 | $this->response('success', Code::SUCCESS, $data); | 72 | $this->response('success', Code::SUCCESS, $data); |
| 73 | } | 73 | } |
| 74 | + | ||
| 75 | + /** | ||
| 76 | + * @remark :保存确认信息 | ||
| 77 | + * @name :saveInfo | ||
| 78 | + * @author :lyh | ||
| 79 | + * @method :post | ||
| 80 | + * @time :2025/10/30 11:30 | ||
| 81 | + */ | ||
| 82 | + public function saveInfo() | ||
| 83 | + { | ||
| 84 | + $this->request->validate([ | ||
| 85 | + 'id' => 'required', | ||
| 86 | + ], [ | ||
| 87 | + 'id.required' => '主键ID不能为空' | ||
| 88 | + ]); | ||
| 89 | + $data = $this->logic->saveConfirmInfo(); | ||
| 90 | + $this->response('success', Code::SUCCESS, $data); | ||
| 91 | + } | ||
| 74 | } | 92 | } |
| @@ -68,6 +68,24 @@ class GeoConfirmLogic extends BaseLogic | @@ -68,6 +68,24 @@ class GeoConfirmLogic extends BaseLogic | ||
| 68 | public function getConfirmInfo() | 68 | public function getConfirmInfo() |
| 69 | { | 69 | { |
| 70 | $data = $this->model->read($this->param); | 70 | $data = $this->model->read($this->param); |
| 71 | + if($data === false){ | ||
| 72 | + $this->fail('当前数据不存在或者已被删除'); | ||
| 73 | + } | ||
| 74 | + $data['confirm'] = $data['content']; | ||
| 71 | return $this->success($data); | 75 | return $this->success($data); |
| 72 | } | 76 | } |
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * @remark :保存确认信息 | ||
| 80 | + * @name :saveConfirmInfo | ||
| 81 | + * @author :lyh | ||
| 82 | + * @method :post | ||
| 83 | + * @time :2025/10/30 11:41 | ||
| 84 | + */ | ||
| 85 | + public function saveConfirmInfo() | ||
| 86 | + { | ||
| 87 | + $this->param['status'] = GeoConfirm::STATUS_FINISH; | ||
| 88 | + $this->model->edit($this->param,['id'=>$this->param['id']]); | ||
| 89 | + return $this->success(['id'=>$this->param['id']]); | ||
| 90 | + } | ||
| 73 | } | 91 | } |
| @@ -597,6 +597,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -597,6 +597,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 597 | Route::prefix('confirm')->group(function () { | 597 | Route::prefix('confirm')->group(function () { |
| 598 | Route::any('/saveConfirmContent', [Aside\Geo\GeoConfirmController::class, 'saveConfirmContent'])->name('admin.geo_confirm_saveConfirmContent'); | 598 | Route::any('/saveConfirmContent', [Aside\Geo\GeoConfirmController::class, 'saveConfirmContent'])->name('admin.geo_confirm_saveConfirmContent'); |
| 599 | Route::any('/getInfo', [Aside\Geo\GeoConfirmController::class, 'getInfo'])->name('admin.geo_confirm_getInfo'); | 599 | Route::any('/getInfo', [Aside\Geo\GeoConfirmController::class, 'getInfo'])->name('admin.geo_confirm_getInfo'); |
| 600 | + Route::any('/saveInfo', [Aside\Geo\GeoConfirmController::class, 'saveInfo'])->name('admin.geo_confirm_saveInfo'); | ||
| 600 | }); | 601 | }); |
| 601 | //geoai文章任务管理 | 602 | //geoai文章任务管理 |
| 602 | Route::prefix('writing_task')->group(function () { | 603 | Route::prefix('writing_task')->group(function () { |
-
请 注册 或 登录 后发表评论