AggregateKeywordLogic.php 946 字节
<?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\Project\AggregateKeyword;

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

    /**
     * @remark :
     * @name   :saveKeyword
     * @author :lyh
     * @method :post
     * @time   :2025/3/17 16:11
     */
    public function saveKeyword(){
        if(isset($this->param['id']) && !empty($this->param['id'])){
            $id = $this->param['id'];
            $this->model->edit($this->param,['id'=>$this->param['id']]);
        }else{
            $id = $this->model->addReturnId($this->param);
        }
        return $this->success(['id'=>$id]);
    }
}