文件
mashangyoujiu/Application/Common/User/Supplier.class.php

48 行
1.2 KiB
PHP
可执行文件

<?php
namespace Common\User;
use Common\Model\SSupplierModel;
use Common\Model\SupplierModel;
//[1.7.4]
/**
* 供货商类
* Class Supplier
* @package Common\User
*/
class Supplier
{
/**
* 获取门店供货商列表供选择
* @param $store_id 门店id
* @return array|false|mixed|\PDOStatement|string|\think\Collection
*/
public function getStoreUsedSupplierList($store_id)
{
$SupplierModel = new SSupplierModel();
$map = array(
'store_id' => $store_id,
'status' => 1,
);
$data = $SupplierModel->getSelect($map, null, null, 'id,supplier_name', 'id desc');
return $data ? $data : array();
}
/**
* 获取商户供货商列表供选择
* @param $merchant_id 商户id
* @return array|false|mixed|\PDOStatement|string|\think\Collection
*/
public function getMerUsedSupplierList($merchant_id)
{
$SupplierModel = new SupplierModel();
$map = array(
'merchantid' => $merchant_id,
'status' => 1,
);
$data = $SupplierModel->getSelect($map, null, null, 'id,supplier_name', 'id desc');
return $data ? $data : array();
}
}