This commit is contained in:
shoopea 2019-05-11 13:09:17 +08:00
parent 42d1c51891
commit 13455391ac

4
bot.go
View File

@ -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))