From 77a7be52243e3f159bf362ef7978e2e68aa780cb Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 15 Oct 2018 16:46:00 +0800 Subject: [PATCH] fix count --- model/line_message_log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/line_message_log.go b/model/line_message_log.go index 825a902..f60e10b 100644 --- a/model/line_message_log.go +++ b/model/line_message_log.go @@ -34,7 +34,7 @@ func AddLineMessageLog(g, u, msg, t string) (msglog *LineMessageLog, err error) // GetLineMessageLogCount - func GetLineMessageLogCount(where ...interface{}) (c int, err error) { query := `select count(*) as c from "public"."line_message_log"` - values := make([]string, 0) + values := make([]interface{}, 0) if len(where) > 0 { if whereMap, ok := where[0].(map[string]string); ok { str := "" @@ -52,7 +52,7 @@ func GetLineMessageLogCount(where ...interface{}) (c int, err error) { } } } - err = x.Get(&c, query, values) + err = x.Get(&c, query, values...) return }