Files
liche/common/models/biz/Biz_model.php
T
2021-08-26 19:15:15 +08:00

53 lines
1.0 KiB
PHP
Executable File

<?php
/**
* Created by PhpStorm.
* User: linfan
* Date: 2018/11/5
* Time: 13:47
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Biz_model extends HD_Model
{
private $table_name = 'lc_biz';
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
/**
* 根据id获取数据
* @param array() $ids
*/
public function get_map_by_ids($ids,$fileds=''){
$rows = [];
$ids = array_filter($ids);
if($ids){
$cf_ids = implode(',',$ids);
$where = [
"id in ($cf_ids)" => null
];
$rows = $this->map('id','',$where,'','','',$fileds);
}
return $rows;
}
/**
* 获取类型
* @param null $key
* @return mixed
*/
function type_ary($key = null){
$map = array('1' => '合伙店', '2' => '加盟店', '3' => '代理店');
if(!is_null($key)){
return $map[$key];
}
return $map;
}
}