update tributes

This commit is contained in:
shoopea 2020-02-03 14:21:16 +08:00
parent 08e079da60
commit 47229f8849
2 changed files with 2 additions and 2 deletions

2
sql.go
View File

@ -658,7 +658,7 @@ func insertMsgTributesStats(m *ChatWarsMessageTributesStatsAck) error {
defer stmt.Close()
for _, t := range m.Tributes {
_, err := stmt.Exec(m.Msg.TGUserID64, t.ItemID64, t.Quantity, t.Exp, t.Date)
_, err = stmt.Exec(m.Msg.TGUserID64, t.ItemID64, t.Quantity, t.Exp, t.Date)
logOnError(err, "insertMsgTributesStats Exec")
}

View File

@ -516,7 +516,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
botCraftAll(m, rule.re)
case cacheObjSubType[`msg_tributes_stats_req`]:
case cacheObjSubType[`msg_tributes_stats_ack`]:
_, err := parseSubTypeMessageTributesStatsAck(m, rule.re)
cwm, err := parseSubTypeMessageTributesStatsAck(m, rule.re)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Parsing cacheObjSubType[`msg_tributes_stats_ack`]")
err = insertMsgTributesStats(cwm)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : insertMsgTributesStats")