$map = [ 'id' => ['in', $ids], 'type' => $type ];
tp5.1 是这样的
//thinkphp 5.1 写法 $map = [ ['id','in',$ids], ['type','=',$type], ];