fix error

This commit is contained in:
Jay 2018-12-11 11:46:48 +08:00
parent 49903f9c9d
commit 7df496142d

View File

@ -75,7 +75,7 @@ func GetCommandCount(where ...interface{}) (c int, err error) {
// GetCommands - // GetCommands -
func GetCommands(where map[string]string, offset, limit int, order map[string]string) (cmds []*CommandsWithGroup, err error) { func GetCommands(where map[string]string, offset, limit int, order map[string]string) (cmds []*CommandsWithGroup, err error) {
query := `select c.*, (case when g.name is null then '' else g.name end) as group_name from "public"."commands" query := `select c.*, (case when g.name is null then '' else g.name end) as group_name from "public"."commands" c
left join "public"."line_group" g left join "public"."line_group" g
on g.id = c.group ` on g.id = c.group `
values := make([]interface{}, (len(where) + len(order))) values := make([]interface{}, (len(where) + len(order)))