KeywordUrlLogic.php 1.0 KB
<?php
/**
 * @remark :
 * @name   :KeywordUrlLogic.php
 * @author :lyh
 * @method :post
 * @time   :2025/3/12 17:06
 */

namespace App\Http\Logic\Bside\SeoSetting;

use App\Http\Logic\Bside\BaseLogic;
use App\Models\SeoSetting\KeywordUrl;

/**
 * @remark :关键词设置
 * @name   :KeywordUrlLogic
 * @author :lyh
 * @method :post
 * @time   :2025/3/12 17:07
 */
class KeywordUrlLogic extends BaseLogic
{
    public function __construct()
    {
        parent::__construct();
        $this->param = $this->requestAll;
        $this->model = new KeywordUrl();
    }

    /**
     * @remark :保存数据
     * @name   :saveKeywordUrl
     * @author :lyh
     * @method :post
     * @time   :2025/3/12 17:08
     */
    public function saveKeywordUrl(){
        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]);
    }


}