55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Sys_supplier_model extends HD_Model
|
|
{
|
|
private $table_name = 'lc_sys_supplier';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct($this->table_name, 'default');
|
|
}
|
|
|
|
/**
|
|
* 根据id获取数据
|
|
* @param $ids
|
|
* @param string $fileds
|
|
* @param int $type,默认3是兼容用
|
|
* @return array
|
|
*/
|
|
public function get_map_by_ids($ids, $fileds = '', $type=3)
|
|
{
|
|
$rows = [];
|
|
$ids = array_filter($ids);
|
|
if ($ids) {
|
|
$cf_ids = implode(',', $ids);
|
|
$where = [
|
|
"id in ($cf_ids)" => null
|
|
];
|
|
$type && $where['type'] = $type;
|
|
$rows = $this->map('id', '', $where, '', '', '', $fileds);
|
|
}
|
|
return $rows;
|
|
}
|
|
|
|
/**
|
|
* 状态
|
|
* @return array
|
|
*/
|
|
function status_ary(){
|
|
$statusAry = array(/*'-1' => '删除',*/ '0' => '关闭', '1' => '开启');
|
|
|
|
return $statusAry;
|
|
}
|
|
|
|
/**
|
|
* 类型
|
|
* @return array
|
|
*/
|
|
function type_ary(){
|
|
$typeAry = array('1' => '挂牌', '2' => '保险', '3' => '按揭', '4' =>'精品');
|
|
|
|
return $typeAry;
|
|
}
|
|
}
|