add
This commit is contained in:
@@ -135,10 +135,9 @@ func CreateHandler(c *gin.Context) {
|
||||
var recordID string
|
||||
err = tx.QueryRow(
|
||||
`INSERT INTO trading_records (event_type, payload)
|
||||
VALUES ($1, $2)
|
||||
RETURNING id`,
|
||||
req.EventType,
|
||||
payloadBytes,
|
||||
VALUES ('交易中', $1)
|
||||
RETURNING id`,
|
||||
payloadBytes, // 只剩一个占位符
|
||||
).Scan(&recordID)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
@@ -182,4 +181,4 @@ func CreateHandler(c *gin.Context) {
|
||||
RecordID: recordID,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user