AiNewsLogic.php 700 字节
<?php

namespace App\Http\Logic\Bside\Ai;

use App\Http\Logic\Bside\BaseLogic;
use App\Models\Ai\AiNews;

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

    /**
     * @remark :AI发布新闻
     * @name   :newsSave
     * @author :lyh
     * @method :post
     * @time   :2023/7/5 14:44
     */
    public function newsSave(){
        $this->param['project_id'] = $this->user['project_id'];
        $rs = $this->model->add($this->param);
        if($rs === false){
            $this->fail('error');
        }
        return $this->success();
    }
}