From fe14227d9feeecb9496d26b34f97c189cf078f3e Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sat, 5 Apr 2025 19:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dppt=E6=B6=88=E6=81=AF,?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B6=88=E6=81=AF=E5=A4=A7=E7=BA=B2=E7=AD=89?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/spark/spark-ppt.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/service/spark/spark-ppt.go b/service/spark/spark-ppt.go index d8f0e8a..efb6528 100644 --- a/service/spark/spark-ppt.go +++ b/service/spark/spark-ppt.go @@ -345,6 +345,11 @@ func SparkDoGetPPTInfoBySID(modelParam *proto.ModelParam, userReq *proto.SparkCr resp.Desc = string(outlineStr) //大纲信息 service.CreateAIStreamMsg(base.UserID, base.ModelID, int(base.SessionID), resp, modelParam.Model) //保存消息 var respStr []byte + respStr, _ = json.Marshal(resp) + //添加到消息队列,用于前端查询 + key := fmt.Sprintf("user-%d-session-%d-create-pptx", base.UserID, base.SessionID) + worker.SetRedisWithExpire(key, string(respStr), time.Second*60*60) //设置60分钟过期 + log.Println("Spark create ppt status set redis key:", key, "value:", string(respStr)) if resp.Code != 0 { log.Println("Spark create ppt by outline Error:", resp) return @@ -375,12 +380,6 @@ func SparkDoGetPPTInfoBySID(modelParam *proto.ModelParam, userReq *proto.SparkCr log.Println("spark create ppt by outline success,msg id:", userMsgID) return } - respStr, _ = json.Marshal(resp) - //添加到消息队列,用于前端查询 - key := fmt.Sprintf("user-%d-session-%d-create-pptx", base.UserID, base.SessionID) - worker.SetRedisWithExpire(key, string(respStr), time.Second*60*60) //设置60分钟过期 - log.Println("Spark create ppt status set redis key:", key, "value:", string(respStr)) - } } }