diff --git a/internal/msg_gateway/gate/validate.go b/internal/msg_gateway/gate/validate.go index 269229e9c..fe1411a62 100644 --- a/internal/msg_gateway/gate/validate.go +++ b/internal/msg_gateway/gate/validate.go @@ -59,7 +59,7 @@ type SeqListData struct { func (ws *WServer) argsValidate(m *Req, r int32) (isPass bool, errCode int32, errMsg string, returnData interface{}) { switch r { case constant.WSSendMsg: - data := open_im_sdk.UserSendMsgReq{} + data := open_im_sdk.MsgData{} if err := proto.Unmarshal(m.Data, &data); err != nil { log.ErrorByKv("Decode Data struct err", "", "err", err.Error(), "reqIdentifier", r) return false, 203, err.Error(), nil diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 69d3c2bc3..c6391bcb3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -104,7 +104,7 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe resp := pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for _, v := range req.ConversationIDList { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: 0}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: req.Opt}) } log.NewInfo(req.OperationID, "SetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 298487c38..fb7001b41 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select([]string{"user_id"}).Scan(&resultArr).Error + err = dbConn.Table("user").Select("user_id").Scan(&resultArr).Error if err != nil { return nil, err }