正在显示
3 个修改的文件
包含
33 行增加
和
1 行删除
| @@ -68,6 +68,23 @@ class OaNoticeController extends BaseController | @@ -68,6 +68,23 @@ class OaNoticeController extends BaseController | ||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | /** | 70 | /** |
| 71 | + * @remark :获取详情 | ||
| 72 | + * @name :info | ||
| 73 | + * @author :lyh | ||
| 74 | + * @method :post | ||
| 75 | + * @time :2024/6/20 16:04 | ||
| 76 | + */ | ||
| 77 | + public function info(OaNoticeLogic $oaNoticeLogic){ | ||
| 78 | + $this->request->validate([ | ||
| 79 | + 'id'=>'required', | ||
| 80 | + ],[ | ||
| 81 | + 'id.required' => 'ID不能为空', | ||
| 82 | + ]); | ||
| 83 | + $data = $oaNoticeLogic->infoOaNotice(); | ||
| 84 | + $this->response('success',Code::SUCCESS,$data); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 71 | * @remark :保存数据 | 88 | * @remark :保存数据 |
| 72 | * @name :save | 89 | * @name :save |
| 73 | * @author :lyh | 90 | * @author :lyh |
| @@ -54,4 +54,19 @@ class OaNoticeLogic extends BaseLogic | @@ -54,4 +54,19 @@ class OaNoticeLogic extends BaseLogic | ||
| 54 | $this->model->edit(['status'=>$this->param['status']],['id'=>$id]); | 54 | $this->model->edit(['status'=>$this->param['status']],['id'=>$id]); |
| 55 | return $this->success(['id'=>$id]); | 55 | return $this->success(['id'=>$id]); |
| 56 | } | 56 | } |
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * @remark :获取详情 | ||
| 60 | + * @name :infoOaNotice | ||
| 61 | + * @author :lyh | ||
| 62 | + * @method :post | ||
| 63 | + * @time :2024/6/20 16:04 | ||
| 64 | + */ | ||
| 65 | + public function infoOaNotice(){ | ||
| 66 | + $info = $this->model->read($this->param); | ||
| 67 | + if($info == false){ | ||
| 68 | + $this->fail('当前数据不存在或已被删除'); | ||
| 69 | + } | ||
| 70 | + return $this->success($info); | ||
| 71 | + } | ||
| 57 | } | 72 | } |
| @@ -419,7 +419,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -419,7 +419,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 419 | Route::any('/', [Aside\Com\OaNoticeController::class, 'lists'])->name('admin.oa_notice_lists'); | 419 | Route::any('/', [Aside\Com\OaNoticeController::class, 'lists'])->name('admin.oa_notice_lists'); |
| 420 | Route::any('/save', [Aside\Com\OaNoticeController::class, 'save'])->name('admin.oa_notice_save'); | 420 | Route::any('/save', [Aside\Com\OaNoticeController::class, 'save'])->name('admin.oa_notice_save'); |
| 421 | Route::any('/status', [Aside\Com\OaNoticeController::class, 'status'])->name('admin.oa_notice_status'); | 421 | Route::any('/status', [Aside\Com\OaNoticeController::class, 'status'])->name('admin.oa_notice_status'); |
| 422 | - Route::any('/del', [Aside\Com\OaNoticeController::class, 'del'])->name('admin.oa_notice_del'); | 422 | + Route::any('/info', [Aside\Com\OaNoticeController::class, 'info'])->name('admin.oa_notice_info'); |
| 423 | }); | 423 | }); |
| 424 | 424 | ||
| 425 | Route::any('/generate_aicc_token', [Aside\Com\IndexController::class, 'generateAiCCToken'])->name('admin.generate_aicc_token'); | 425 | Route::any('/generate_aicc_token', [Aside\Com\IndexController::class, 'generateAiCCToken'])->name('admin.generate_aicc_token'); |
-
请 注册 或 登录 后发表评论