$distribution_channel_id,'custom_category'=>$custom_category])->first(); } /** * 根据distribution_channel_id获取所有客服消息开关 */ static function customMsgSwitchsMsgsByChannelId($distribution_channel_id) { return self::where('distribution_channel_id',$distribution_channel_id)->get(); } function customMsgSwitchs(){ return $this->hasOne('App\Modules\OfficialAccount\Models\CustomMsgSwitchs','custom_category','custom_category'); } }