fix count
This commit is contained in:
parent
b24625235d
commit
77a7be5224
@ -34,7 +34,7 @@ func AddLineMessageLog(g, u, msg, t string) (msglog *LineMessageLog, err error)
|
|||||||
// GetLineMessageLogCount -
|
// GetLineMessageLogCount -
|
||||||
func GetLineMessageLogCount(where ...interface{}) (c int, err error) {
|
func GetLineMessageLogCount(where ...interface{}) (c int, err error) {
|
||||||
query := `select count(*) as c from "public"."line_message_log"`
|
query := `select count(*) as c from "public"."line_message_log"`
|
||||||
values := make([]string, 0)
|
values := make([]interface{}, 0)
|
||||||
if len(where) > 0 {
|
if len(where) > 0 {
|
||||||
if whereMap, ok := where[0].(map[string]string); ok {
|
if whereMap, ok := where[0].(map[string]string); ok {
|
||||||
str := ""
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user