|
...
|
...
|
@@ -27,6 +27,41 @@ class AiBlogController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取详情
|
|
|
|
* @name :getInfo
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/2/20 18:17
|
|
|
|
*/
|
|
|
|
public function getInfo(AiBlog $aiBlog){
|
|
|
|
$this->request->validate([
|
|
|
|
'id'=>['required'],
|
|
|
|
],[
|
|
|
|
'id.required' => '主键不能为空',
|
|
|
|
]);
|
|
|
|
$info = $aiBlog->read(['id'=>$this->param['id']]);
|
|
|
|
$this->response('success',Code::SUCCESS,$info);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除
|
|
|
|
* @name :delete
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/2/20 18:19
|
|
|
|
*/
|
|
|
|
public function delete(AiBlogLogic $aiBlogLogic)
|
|
|
|
{
|
|
|
|
$this->request->validate([
|
|
|
|
'ids'=>['required', new Ids()]
|
|
|
|
],[
|
|
|
|
'ids.required' => 'ID不能为空'
|
|
|
|
]);
|
|
|
|
$aiBlogLogic->blogDelete();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取ai博客列表
|
|
|
|
* @name :getAiBlog
|
|
|
|
* @author :lyh
|
...
|
...
|
|