This commit is contained in:
shoopea 2020-01-02 19:45:56 +08:00
parent a35a84aecd
commit 49cae62711
2 changed files with 2 additions and 2 deletions

2
obj.go
View File

@ -232,7 +232,7 @@ func addObjMsg(msgID64 int64, msgChatID64 int64, msgTGUserID64 int64, msgTGSende
}
res, err := tx.Exec(`INSERT INTO obj (obj_type_id, obj_sub_type_id)
VALUES (` + strconv.Itoa(objTypeMessage) + `,` + strconv.Itoa(cacheObjSubType[`msg`]) + `);`)
VALUES (` + strconv.Itoa(objTypeMessage) + `,` + strconv.FormatInt(cacheObjSubType[`msg`], 10) + `);`)
if err != nil {
err2 := tx.Rollback()
logOnError(err2, "addObjMsg : rollback insert obj")

2
sql.go
View File

@ -610,7 +610,7 @@ func initDB() {
,obj oi
,obj_msg_item omi
WHERE om.obj_type_id = ` + strconv.Itoa(objTypeMessage) + `
AND om.obj_sub_type_id in (` + strconv.Itoa(cacheObjSubType[`msg_withdraw_rcv`]) + `, ` + strconv.Itoa(cacheObjSubType[`msg_g_deposit_ack`]) + `)
AND om.obj_sub_type_id in (` + strconv.FormatInt(cacheObjSubType[`msg_withdraw_rcv`], 10) + `, ` + strconv.FormatInt(cacheObjSubType[`msg_g_deposit_ack`], 10) + `)
AND obm.obj_id = om.id
AND omi.obj_id = om.id
AND oi.id = omi.item_id