From e77ab14af1a0fd0be1e0cc2a32b49f6d975622c3 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 6 Jul 2023 18:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0sql?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/common.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crmeb/app/common.php b/crmeb/app/common.php index 8d8575b0d..fb9968911 100644 --- a/crmeb/app/common.php +++ b/crmeb/app/common.php @@ -23,6 +23,7 @@ use app\services\system\lang\LangCodeServices; use app\services\system\lang\LangCountryServices; use think\facade\Config; use think\facade\Log; +use think\facade\Db; if (!function_exists('crmebLog')) { /** @@ -1090,3 +1091,19 @@ if (!function_exists('out_push')) { return true; } } + +if (!function_exists('dump_sql')) { + /** + * 默认数据推送 + * @param string $pushUrl + * @param array $data + * @param string $tip + * @return bool + */ + function dump_sql() + { + Db::listen(function ($sql) { + var_dump($sql); + }); + } +}