Browse Source

wip:提交浮标消息类型接口问题

wangkaiyue 2 năm trước cách đây
mục cha
commit
d5777f1503
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      api/internal/logic/multiplesavemsglogic.go

+ 3 - 2
api/internal/logic/multiplesavemsglogic.go

@@ -6,6 +6,7 @@ import (
 	"app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
 	"app.yhyue.com/moapp/MessageCenter/util"
 	"context"
+	"encoding/json"
 	"github.com/tal-tech/go-zero/core/logx"
 	"log"
 )
@@ -39,7 +40,7 @@ func (l *MultipleSaveMsgLogic) MultipleSaveMsg(req types.MultipleSaveMsgReq) (*t
 	errCount := 0
 	lsi := l.svcCtx.MessageCenter
 	msgInfo := req.MsgInfo
-	log.Println("###############", int64(util.IntAll(msgInfo["msgLogId"])))
+	showBuoyValue, _ := msgInfo["showBuoy"].(json.Number).Int64()
 	_, err := lsi.MultipleSaveMsg(l.ctx, &messageclient.MultipleSaveMsgReq{
 		Appid:       util.ObjToString(msgInfo["appid"]),
 		SendUserId:  util.ObjToString(msgInfo["sendUserId"]),
@@ -52,7 +53,7 @@ func (l *MultipleSaveMsgLogic) MultipleSaveMsg(req types.MultipleSaveMsgReq) (*t
 		UserIds:     req.UserIds,
 		UserNames:   req.UserNames,
 		MsgLogId:    int64(util.IntAll(msgInfo["msgLogId"])),
-		ShowBuoy:    int64(util.IntAll(msgInfo["showBuoy"])),
+		ShowBuoy:    showBuoyValue,
 		ShowContent: util.ObjToString(msgInfo["showContent"]),
 	})
 	if err != nil {