Explorar el Código

新用户消息修改

renjiaojiao hace 1 año
padre
commit
09aa00992f
Se han modificado 1 ficheros con 4 adiciones y 6 borrados
  1. 4 6
      api/internal/logic/newusersavemsglogic.go

+ 4 - 6
api/internal/logic/newusersavemsglogic.go

@@ -6,8 +6,6 @@ import (
 	"app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
 	"app.yhyue.com/moapp/MessageCenter/util"
 	"context"
-	"encoding/json"
-	"fmt"
 	"github.com/zeromicro/go-zero/core/logx"
 )
 
@@ -28,17 +26,17 @@ func NewNewUserSaveMsgLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Ne
 func (l *NewUserSaveMsgLogic) NewUserSaveMsg(req *types.NewUserSaveMsgReq) (resp *types.NewUserSaveMsgResp, err error) {
 	lsi := l.svcCtx.MessageCenter
 	msgInfo := req.MsgInfo
-	msgLogId, err := (msgInfo["msgLogId"]).(json.Number).Int64()
+	/*msgLogId, err := (msgInfo["msgLogId"]).(json.Number).Int64()
 	msgType, err := (msgInfo["msgType"]).(json.Number).Int64()
-	fmt.Println("msgInfo:", msgInfo)
+	fmt.Println("msgInfo:", msgInfo)*/
 	_, err = lsi.NewUserMsg(l.ctx, &messageclient.NewUserInsertMsgReq{
 		Appid:       util.ObjToString(msgInfo["appid"]),
 		Title:       util.ObjToString(msgInfo["title"]),
 		Content:     util.ObjToString(msgInfo["content"]),
-		MsgType:     msgType,
+		MsgType:     util.Int64All(msgInfo["msgType"]),
 		Link:        util.ObjToString(msgInfo["link"]),
 		UserIds:     req.UserIds,
-		MsgLogId:    msgLogId,
+		MsgLogId:    util.Int64All(msgInfo["msgLogId"]),
 		PositionIds: req.PositionIds,
 		Row4:        util.ObjToString(msgInfo["row4"]),
 		ProductName: util.ObjToString(msgInfo["productName"]),