dengbiao 5 months ago
parent
commit
346a03904f
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      consume/canal_gim_message_consume.go

+ 1
- 3
consume/canal_gim_message_consume.go View File

@@ -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
}


Loading…
Cancel
Save