From db70a8b5c48b1f1f86a246b820ea1af36a45f735 Mon Sep 17 00:00:00 2001 From: hoteas <925970985@qq.com> Date: Sat, 14 Sep 2019 17:01:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.go | 7 +++++++ var.go | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index 7994b8a..dfd2dbe 100644 --- a/db.go +++ b/db.go @@ -119,6 +119,13 @@ func (this *HoTimeDB) Row(resl *sql.Rows) []Map { } } + //防止int被误读为float64 + jlis,e:=json.Marshal(lis) + if e!=nil{ + this.LastErr.SetError(e) + }else{ + lis.JsonToMap(string(jlis),&this.LastErr) + } dest = append(dest, lis) diff --git a/var.go b/var.go index 66cbf9b..56d5504 100644 --- a/var.go +++ b/var.go @@ -21,7 +21,9 @@ var Config = Map{ "cacheShortTime": 60 * 60 * 2, "cacheLongTime": 60 * 60 * 24 * 30, "sessionName": "HOTIME", - "error": Map{}, + "error": Map{ + "1":"系统错误", + }, "debug":1,//debug 0关闭1开启 "modeRouterStrict":false,//路由严格模式/a/b/c "tlsPort":"0",