This commit is contained in:
shoopea 2019-05-11 13:12:16 +08:00
parent 0ef91c7361
commit d6db9a08ba

8
bot.go
View File

@ -80,8 +80,8 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
r := regexp.MustCompile("^[0-9]+$")
if r.MatchString(m.Payload) {
fmt.Sprintf(s, "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)
p.Query = s
fmt.Sprintf(q, "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)
p.Query = q
b, _ := json.Marshal(p)
log.Printf("botMsgRescan : %s\n", string(b))
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanMsg, time.Now(), b)
@ -95,8 +95,8 @@ func botMsgRescan(m *tb.Message) (string, error) {
}
r = regexp.MustCompile("^all$")
if r.MatchString(m.Payload) {
fmt.Sprintf(s, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnknown)
p.Query = s
fmt.Sprintf(q, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnknown)
p.Query = q
b, _ := json.Marshal(p)
log.Printf("botMsgRescan : %s\n", string(b))
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanAllMsg, time.Now(), b)