正在显示
5 个修改的文件
包含
64 行增加
和
3 行删除
| @@ -7,6 +7,9 @@ use App\Http\Controllers\Aside\BaseController; | @@ -7,6 +7,9 @@ use App\Http\Controllers\Aside\BaseController; | ||
| 7 | use App\Models\AiCommand as AiCommandModel; | 7 | use App\Models\AiCommand as AiCommandModel; |
| 8 | use function App\Helper\send_openai_msg; | 8 | use function App\Helper\send_openai_msg; |
| 9 | 9 | ||
| 10 | +/** | ||
| 11 | + * @name:ai指令 | ||
| 12 | + */ | ||
| 10 | class AiCommandController extends BaseController | 13 | class AiCommandController extends BaseController |
| 11 | { | 14 | { |
| 12 | /** | 15 | /** |
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace App\Http\Controllers\Aside; | ||
| 4 | + | ||
| 5 | +use App\Enums\Common\Code; | ||
| 6 | +use App\Models\Mail\Mail as MailModel; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @name:站内信 | ||
| 10 | + */ | ||
| 11 | +class MailController extends BaseController | ||
| 12 | +{ | ||
| 13 | + public function lists(){ | ||
| 14 | + $mailModel = new MailModel(); | ||
| 15 | + $lists = $mailModel->lists($this->map,$this->page,$this->row,$this->order); | ||
| 16 | + $this->response('列表',Code::SUCCESS,$lists); | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * @name :添加站内信 | ||
| 21 | + * @return void | ||
| 22 | + * @author :liyuhang | ||
| 23 | + * @method | ||
| 24 | + */ | ||
| 25 | + public function add(){ | ||
| 26 | + | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * @name :编辑站内信 | ||
| 31 | + * @return void | ||
| 32 | + * @author :liyuhang | ||
| 33 | + * @method | ||
| 34 | + */ | ||
| 35 | + public function edit(){ | ||
| 36 | + | ||
| 37 | + } | ||
| 38 | + /** | ||
| 39 | + * @name :逻辑删除站内信 | ||
| 40 | + * @return void | ||
| 41 | + * @author :liyuhang | ||
| 42 | + * @method | ||
| 43 | + */ | ||
| 44 | + public function del(){ | ||
| 45 | + | ||
| 46 | + } | ||
| 47 | +} |
| @@ -172,7 +172,7 @@ class BlogLogic extends BaseLogic | @@ -172,7 +172,7 @@ class BlogLogic extends BaseLogic | ||
| 172 | */ | 172 | */ |
| 173 | public function blog_del(){ | 173 | public function blog_del(){ |
| 174 | $this->param['id'] = ['in',$this->param['id']]; | 174 | $this->param['id'] = ['in',$this->param['id']]; |
| 175 | - $rs = $this->model->edit(['status'=>$this::STATUS_TWO],$this->param); | 175 | + $rs = $this->model->del($this->param); |
| 176 | if($rs === false){ | 176 | if($rs === false){ |
| 177 | $this->fail('error',Code::USER_ERROR); | 177 | $this->fail('error',Code::USER_ERROR); |
| 178 | } | 178 | } |
| @@ -132,7 +132,7 @@ class NewsLogic extends BaseLogic | @@ -132,7 +132,7 @@ class NewsLogic extends BaseLogic | ||
| 132 | $this->param['operator_id'] = $this->user['id']; | 132 | $this->param['operator_id'] = $this->user['id']; |
| 133 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); | 133 | $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 134 | if($rs === false){ | 134 | if($rs === false){ |
| 135 | - $this->fail('error',Code::USER_ERROR); | 135 | + $this->fail('error'); |
| 136 | } | 136 | } |
| 137 | $this->success(); | 137 | $this->success(); |
| 138 | } | 138 | } |
| @@ -168,7 +168,7 @@ class NewsLogic extends BaseLogic | @@ -168,7 +168,7 @@ class NewsLogic extends BaseLogic | ||
| 168 | */ | 168 | */ |
| 169 | public function news_del(){ | 169 | public function news_del(){ |
| 170 | $this->param['id'] = ['in',$this->param['id']]; | 170 | $this->param['id'] = ['in',$this->param['id']]; |
| 171 | - $rs = $this->model->edit(['status'=>2,'operator_id'=>$this->user['id']],$this->param); | 171 | + $rs = $this->model->del($this->param); |
| 172 | if($rs === false){ | 172 | if($rs === false){ |
| 173 | $this->fail('error'); | 173 | $this->fail('error'); |
| 174 | } | 174 | } |
-
请 注册 或 登录 后发表评论