From 49903f9c9d3226d2f3d03c12801bf5c0432f61a6 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 11 Dec 2018 11:41:04 +0800 Subject: [PATCH] add query --- model/commands.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/commands.go b/model/commands.go index 6ea3dc9..3de3321 100644 --- a/model/commands.go +++ b/model/commands.go @@ -69,7 +69,7 @@ func GetCommandCount(where ...interface{}) (c int, err error) { } } } - err = x.Get(&c, query, values) + err = x.Get(&c, query, values...) return } @@ -119,6 +119,8 @@ func GetCommands(where map[string]string, offset, limit int, order map[string]st } } + err = x.Select(cmds, query, values...) + return }