Merge remote-tracking branch 'origin/tuoyun' into tuoyun

pull/131/head
wenxu12345 3 years ago
commit 4cb02bd3a5

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

@ -2,7 +2,6 @@ package logic
import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
pbMsg "Open_IM/pkg/proto/chat"
"Open_IM/pkg/utils"
@ -21,7 +20,3 @@ func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error {
log.NewInfo(msg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time)
return db.DB.SaveUserChat(uid, pbSaveData.MsgData.SendTime, &pbSaveData)
}
func getGroupList(groupID string) ([]string, error) {
return im_mysql_model.SelectGroupList(groupID)
}

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

@ -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").Pluck("user_id", &resultArr).Error
if err != nil {
return nil, err
}

Loading…
Cancel
Save