修复bug

This commit is contained in:
liyp 2024-04-21 11:12:28 +08:00
parent 857ef6f28f
commit 6419a12cf3

View file

@ -45,7 +45,7 @@ func insertMessage(db *sql.DB, data map[string]interface{}) error {
sender_role := sender["role"].(string) sender_role := sender["role"].(string)
fmt.Println(post_type, message_time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role) fmt.Println(post_type, message_time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role)
// Insert data into database // Insert data into database
_, err := db.Exec("INSERT INTO messages ( post_type, message_type, time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", _, err = db.Exec("INSERT INTO messages ( post_type, message_type, time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
post_type, message_type, message_time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role) post_type, message_type, message_time, group_id, message_id, raw_message, sender_user_id, sender_nickname, sender_card, sender_role)
fmt.Println("Data inserted successfully!") fmt.Println("Data inserted successfully!")
if err != nil { if err != nil {