public function getVendorProductList() { $vendorId = isset($_REQUEST['vendorId']) ? (int) $_REQUEST['vendorId'] : null; $res = array(); if (!empty($vendorId)) { $model = new ProductModel(); $res = $model->getProductBasicinfoListByVendorId($vendorId); } echo json_encode($res); }