|
@@ -3,6 +3,7 @@ package service
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/MessageCenter/entity"
|
|
|
"app.yhyue.com/moapp/MessageCenter/rpc/message"
|
|
|
+ "app.yhyue.com/moapp/MessageCenter/util"
|
|
|
qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
"errors"
|
|
|
"log"
|
|
@@ -75,8 +76,10 @@ func (service *MessageService) LastMessage(userId string, appId string, msgType
|
|
|
lastMsg := entity.Mysql.FindOne("message", query, "", "createtime desc")
|
|
|
|
|
|
if lastMsg != nil && len(*lastMsg) > 0 {
|
|
|
+ _id := util.Int64All((*lastMsg)["id"])
|
|
|
+ id := strconv.FormatInt(_id, 10)
|
|
|
msg := message.Messages{
|
|
|
- Id: qutil.ObjToString((*lastMsg)["id"]),
|
|
|
+ Id: id,
|
|
|
Appid: qutil.ObjToString((*lastMsg)["appid"]),
|
|
|
ReceiveUserId: qutil.ObjToString((*lastMsg)["receive_userid"]),
|
|
|
ReceiveName: qutil.ObjToString((*lastMsg)["receive_name"]),
|