|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :AiBlogKeywordController.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/4 14:35
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Bside\Ai;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Bside\BaseController;
|
|
|
|
use App\Http\Logic\Bside\Ai\AiBlogKeywordLogic;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
class AiBlogKeywordController extends BaseController
|
|
|
|
{
|
|
|
|
public function __construct(Request $request)
|
|
|
|
{
|
|
|
|
parent::__construct($request);
|
|
|
|
$this->logic = new AiBlogKeywordLogic();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取关键词详情
|
|
|
|
* @name :getKeywordInfo
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/4 14:35
|
|
|
|
*/
|
|
|
|
public function getKeywordInfo()
|
|
|
|
{
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>['required'],
|
|
|
|
],[
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->getKeywordInfo();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存对应关键词
|
|
|
|
* @name :saveKeyword
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/4 14:35
|
|
|
|
*/
|
|
|
|
public function saveKeyword()
|
|
|
|
{
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>['required'],
|
|
|
|
'keywords'=>['required'],
|
|
|
|
],[
|
|
|
|
'project_id.required' => '项目ID不能为空',
|
|
|
|
'keywords.required' => 'keywords不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->saveKeyword();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|