|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :AggregateKeywordAffixController.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/27 14:20
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Aside\Project;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Project\AggregateKeywordAffixLogic;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
class AggregateKeywordAffixController extends BaseController
|
|
|
|
{
|
|
|
|
public function __construct(Request $request)
|
|
|
|
{
|
|
|
|
parent::__construct($request);
|
|
|
|
$this->logic = new AggregateKeywordAffixLogic();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取当前项目关键字前后缀
|
|
|
|
* @name :getAffix
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/27 14:23
|
|
|
|
*/
|
|
|
|
public function getAffix(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->getAffix();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存关键字前后缀
|
|
|
|
* @name :save
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/5/27 14:23
|
|
|
|
*/
|
|
|
|
public function saveAffix(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
'prefix'=>'required',
|
|
|
|
'suffix'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
'prefix.required' => '前缀不能为空',
|
|
|
|
'suffix.required' => '后缀不能为空',
|
|
|
|
]);
|
|
|
|
$data = $this->logic->saveAffix();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
} |
...
|
...
|
|