From 9f8630784dacee2b5f9550a0cafef7c34de315a4 Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Tue, 19 Aug 2025 01:49:19 +0800 Subject: [PATCH] change database config --- internal/infrastructure/database/database.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/infrastructure/database/database.go b/internal/infrastructure/database/database.go index dcb5677..f3078e0 100644 --- a/internal/infrastructure/database/database.go +++ b/internal/infrastructure/database/database.go @@ -46,6 +46,8 @@ func NewConnection(config Config) (*DB, error) { NowFunc: func() time.Time { return time.Now().In(time.FixedZone("CST", 8*3600)) // 强制使用北京时间 }, + PrepareStmt: true, + DisableAutomaticPing: false, } // 连接数据库