->where(function ($query) { $param = $this->request->param(); $train_body_id = isset($param['train_body_id'])?$param['train_body_id']:0; $query->where('find_in_set(' . $train_body_id . ',train_body_ids ) >0'); })
find_in_set(keys,column)
返回字符出现的位置,从1开始