From 346a03904f19f89b25258e3a3957f76e15b48db5 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 18 Jul 2024 18:40:37 +0800 Subject: [PATCH] 1 --- consume/canal_gim_message_consume.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/consume/canal_gim_message_consume.go b/consume/canal_gim_message_consume.go index 0abf827..164c9e8 100644 --- a/consume/canal_gim_message_consume.go +++ b/consume/canal_gim_message_consume.go @@ -93,10 +93,8 @@ func handleCanalGimMessageTable(msg []byte) error { if canalMsg.Type == md.CanalMsgUpdateSqlType { //查找是否有数据 - m := new(model2.Message) for _, item := range canalMsg.Data { - m.Status = int32(utils.StrToInt(item.Status)) - _, err2 := db.ImDb.Where("user_id =?", item.UserId).And("send_time =?", item.SendTime).Cols("status").Update(&m) + _, err2 := db.ImDb.Where("user_id =?", item.UserId).And("send_time =?", item.SendTime).Cols("status").Update(&model2.Message{Status: int32(utils.StrToInt(item.Status))}) if err2 != nil { return err2 }