$type, 'shop_id' => $shop_id]) ->field('client_id,client_secret') ->findOrEmpty()->toArray(); } /** * @notes 根据id获取配置 * @param $id * @param $shop_id * @return array * @author 段誉 * @date 2022/1/20 9:56 */ public static function getConfigById($id, $shop_id) { return PrinterConfig::where(['id' => $id, 'shop_id' => $shop_id]) ->field('client_id,client_secret') ->findOrEmpty()->toArray(); } }