fix line log count

This commit is contained in:
Jay
2018-10-15 16:36:06 +08:00
parent 53669a298f
commit 871ba9300c
2 changed files with 30 additions and 3 deletions
+9 -1
View File
@@ -49,7 +49,15 @@ func GetLineMessageLog(c *context.Context) {
g := c.DefaultQuery("group", "")
u := c.DefaultQuery("user", "")
count, err := model.GetLineMessageLogCount()
where := make(map[string]string)
if len(g) > 0 {
where["group"] = g
}
if len(u) > 0 {
where["user"] = u
}
count, err := model.GetLineMessageLogCount(where)
if err != nil {
c.ServerError(nil)
return