test
This commit is contained in:
parent
a498046c04
commit
161abd6d0b
8
sql.go
8
sql.go
@ -1271,7 +1271,7 @@ func insertMsgReport(objId int64, war_date int32, atk int32, def int32, exp int3
|
|||||||
}
|
}
|
||||||
|
|
||||||
func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error {
|
func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error {
|
||||||
objSubTypeId, err := getObjSubTypeId(m.ID64)
|
objSubTypeId, err := getObjSubTypeId(m.MsgID64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -1279,14 +1279,14 @@ func insertMsgAuctionAnnounce(m *ChatWarsMessageAuctionAnnounce) error {
|
|||||||
return errors.New("Message type mismatch")
|
return errors.New("Message type mismatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
stmt, err := db.Prepare(`INSERT INTO obj_msg_auction_announce (obj_id, lot_id, item, cond, quality, seller, buyer, status, end)
|
stmt, err := db.Prepare(`INSERT INTO obj_msg_auction_announce (obj_id, lot_id, item, cond, quality, seller, buyer, price, status, end)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(?));`)
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(?));`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer stmt.Close()
|
defer stmt.Close()
|
||||||
|
|
||||||
_, err = stmt.Exec(m.MsgID64, m.LotID, m.Item, m.Cond, m.Quality, m.Seller, m.Buyer, m.Status, m.End)
|
_, err = stmt.Exec(m.MsgID64, m.LotID, m.Item, m.Cond, m.Quality, m.Seller, m.Buyer, m.Price, m.Status, m.End)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Crit : %s (%d)\n", r.ReplaceAllString(m.Text, "${Crit}"), objId)
|
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Crit : %s (%d)\n", r.ReplaceAllString(m.Text, "${Crit}"), objId)
|
||||||
case objSubTypeMessageAuctionAnnounce:
|
case objSubTypeMessageAuctionAnnounce:
|
||||||
cwm := ChatWarsMessageAuctionAnnounce{
|
cwm := ChatWarsMessageAuctionAnnounce{
|
||||||
ID64: objId,
|
MsgID64: objId,
|
||||||
}
|
}
|
||||||
cwm.Lot, _ = strconv.Atoi(r.ReplaceAllString(m.Text, "${Lot}"))
|
cwm.Lot, _ = strconv.Atoi(r.ReplaceAllString(m.Text, "${Lot}"))
|
||||||
cwm.Cond = r.ReplaceAllString(m.Text, "${Cond}")
|
cwm.Cond = r.ReplaceAllString(m.Text, "${Cond}")
|
||||||
|
Loading…
Reference in New Issue
Block a user