AggregateKeywordLogic.php 1.0 KB
<?php
/**
 * @remark :
 * @name   :AggregateKeywordLogic.php
 * @author :lyh
 * @method :post
 * @time   :2025/3/17 16:10
 */

namespace App\Http\Logic\Aside\Project;

use App\Http\Logic\Aside\BaseLogic;
use App\Models\Product\Keyword;
use App\Models\Project\AggregateKeyword;
use App\Services\ProjectServer;
use Illuminate\Support\Facades\DB;

class AggregateKeywordLogic extends BaseLogic
{
    public function __construct()
    {
        parent::__construct();
        $this->param = $this->requestAll;
        $this->model = new AggregateKeyword();
    }

    /**
     * @return array
     */
    public function saveKeyword(){
        if (FALSE == empty($this->param['id'])) {
            $this->model->edit($this->param,['id'=>$this->param['id']]);
        } else {
            $this->param['id'] = $this->model->addReturnId($this->param);
            // 添加预设功能 同步关键词 迁入到 namespace App\Console\Commands\Product\SetKeywordSync
        }
        return $this->success(['id'=>$this->param['id']]);
    }

}