From 1573353f49f2793ce98329df886b7ece789eb376 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Fri, 24 Oct 2025 19:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3dbm=E4=BD=BF=E7=94=A8mysql?= =?UTF-8?q?=E8=BF=94=E5=9B=9Ebase64=E7=BC=96=E7=A0=81=E5=90=8E=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dao/dbm.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dao/dbm.go b/dao/dbm.go index 892eaab..388ed44 100644 --- a/dao/dbm.go +++ b/dao/dbm.go @@ -247,7 +247,12 @@ func RunSQLWithOrder(sql string, db_ *gorm.DB) (result proto.SQLResult, err erro // 将当前行数据存入 map(便于按列名访问) rowMap := make(map[string]interface{}) for i, col := range columns { - rowMap[col] = values[i] + val := values[i] + if b, ok := val.([]byte); ok { + rowMap[col] = string(b) + } else { + rowMap[col] = values[i] + } } result.Rows = append(result.Rows, rowMap) }