with(['integralProductSpecItem'])->field($field)->where($where)->order($order)->select(); } /** * API-一对多关联规格项 * @date 2022-11-09 */ public function integralProductSpecItem() { return $this->hasMany('IntegralProductSpecItem', 'spec_id', 'spec_id') ->field('spec_id,spec_item_id,spec_item_value'); } }