EnterpriseProductController.php 1.4 KB
<?php
/**
 * @remark :
 * @name   :EnterpriseProductController.php
 * @author :lyh
 * @method :post
 * @time   :2025/3/26 11:05
 */

namespace App\Http\Controllers\Bside\SeoSetting;

use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Project\EnterpriseProduct;

/**
 * @remark :企业产品库
 * @name   :EnterpriseProductController
 * @author :lyh
 * @method :post
 * @time   :2025/3/26 11:05
 */
class EnterpriseProductController extends BaseController
{
    /**
     * @remark :获取产品库
     * @name   :getEnterProduct
     * @author :lyh
     * @method :post
     * @time   :2025/3/26 11:06
     */
    public function getEnterProduct(EnterpriseProduct $enterpriseProduct){
        $this->map['project_id'] = $this->user['project_id'];
        $data = $enterpriseProduct->lists($this->map,$this->page,$this->row);
        $this->response('success',Code::SUCCESS,$data);
    }

    /**
     * @remark :删除产品库产品
     * @name   :del
     * @author :lyh
     * @method :post
     * @time   :2025/3/27 9:59
     */
    public function del(EnterpriseProduct $enterpriseProduct){
        $this->request->validate([
            'ids'=>['required'],
        ],[
            'ids.required' => 'id不能为空',
        ]);
        $result = $enterpriseProduct->del(['id'=>['in',$this->param['ids']]]);
        $this->response('success',Code::SUCCESS,$result);
    }
}