From 13455391acb3feaf27befe47fbd8e21e72f9a28a Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 11 May 2019 13:09:17 +0800 Subject: [PATCH] test --- bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.go b/bot.go index d4eefe3..10a22ae 100644 --- a/bot.go +++ b/bot.go @@ -76,7 +76,7 @@ func botMsgRescan(m *tb.Message) (string, error) { } r := regexp.MustCompile("^[0-9]+$") if r.MatchString(m.Payload) { - p := JobPayloadRescanMsg{} + var p JobPayloadRescanMsg fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.id = %s and o.obj_type_id = %d and o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) log.Printf("botMsgRescan : %s\n", string(b)) @@ -91,7 +91,7 @@ func botMsgRescan(m *tb.Message) (string, error) { } r = regexp.MustCompile("^all$") if r.MatchString(m.Payload) { - p := JobPayloadRescanMsg{} + var p JobPayloadRescanMsg fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) log.Printf("botMsgRescan : %s\n", string(b))