This commit is contained in:
shoopea 2020-02-03 14:51:22 +08:00
parent d0640f4e25
commit cdcb9b87d9

4
sql.go
View File

@ -641,6 +641,7 @@ func insertMsgDuelFight(m *ChatWarsMessageDuelFight) error {
} }
func insertMsgTributesStats(m *ChatWarsMessageTributesStatsAck) error { func insertMsgTributesStats(m *ChatWarsMessageTributesStatsAck) error {
log.Printf("insertMsgTributesStats : starting\n")
objSubTypeId, err := getObjSubTypeId(m.Msg.ObjID64) objSubTypeId, err := getObjSubTypeId(m.Msg.ObjID64)
if err != nil { if err != nil {
return err return err
@ -649,6 +650,7 @@ func insertMsgTributesStats(m *ChatWarsMessageTributesStatsAck) error {
return errors.New("Message type mismatch") return errors.New("Message type mismatch")
} }
log.Printf("insertMsgTributesStats : preppring stmt\n")
stmt, err := db.Prepare(`INSERT INTO obj_tribute (tg_user_id, item_id, quantity, exp, date) stmt, err := db.Prepare(`INSERT INTO obj_tribute (tg_user_id, item_id, quantity, exp, date)
VALUES (?, ?, ?, ?, ?);`) VALUES (?, ?, ?, ?, ?);`)
logOnError(err, "insertMsgTributesStats : Prepare") logOnError(err, "insertMsgTributesStats : Prepare")
@ -663,6 +665,8 @@ func insertMsgTributesStats(m *ChatWarsMessageTributesStatsAck) error {
logOnError(err, "insertMsgTributesStats Exec") logOnError(err, "insertMsgTributesStats Exec")
} }
log.Printf("insertMsgTributesStats : returning\n")
return nil return nil
} }