with(['mallProductSpecItem'])->field($field)->where($where)->order($order)->select(); } /** * 一对多关联规格项 */ public function mallProductSpecItem() { return $this->hasMany('MallProductSpecItem', 'spec_id', 'spec_id')->field('spec_id,spec_item_id,spec_item_value'); } }