edit-api-attr_status
This commit is contained in:
@@ -162,7 +162,7 @@ class Series extends Wxapp{
|
||||
$rows = $this->auto_cars_model->select($where,'id desc',$page,$size,'id,s_id,v_id');
|
||||
if($rows){
|
||||
$target_arr = array_unique(array_column($rows,'v_id'));
|
||||
$attrs = $this->auto_attr_model->get_map_by_ids($target_arr,'id,title');
|
||||
$attrs = $this->auto_attr_model->get_map_by_ids($target_arr,'id,title',1);
|
||||
foreach($attrs as $key => $val){
|
||||
$lists[] = [
|
||||
'id' => $key,
|
||||
|
||||
@@ -24,16 +24,16 @@ class Auto_attr_model extends HD_Model{
|
||||
* @param string $fileds
|
||||
* @return array
|
||||
*/
|
||||
public function get_map_by_ids($ids, $fileds = '')
|
||||
public function get_map_by_ids($ids, $fileds = '',$status='')
|
||||
{
|
||||
$rows = [];
|
||||
$ids = array_filter($ids);
|
||||
if ($ids) {
|
||||
$cf_ids = implode(',', $ids);
|
||||
$where = [
|
||||
"status" => 1,
|
||||
"id in ($cf_ids)" => null
|
||||
];
|
||||
strlen($status) && $where['status'] = $status;
|
||||
$rows = $this->map('id', '', $where, '', '', '', $fileds);
|
||||
}
|
||||
return $rows;
|
||||
|
||||
Reference in New Issue
Block a user