'颜色', 1 => '型号', 2 => '内饰颜色']; private $status_arr = [ '-1' => '删除',0 => '下架',1 => '正常']; public function __construct() { parent::__construct($this->table_name, 'default'); } /** * Notes:根据id获取数据 * Created on: 2021/7/15 17:27 * Created by: dengbw * @param $ids * @param string $fileds * @return array */ 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; } public function get_type(){ return $this->type_arr; } public function get_status(){ return $this->status_arr; } }