修复ppt消息,添加消息大纲等信息
This commit is contained in:
parent
e0f6081e0b
commit
fe14227d9f
|
|
@ -345,6 +345,11 @@ func SparkDoGetPPTInfoBySID(modelParam *proto.ModelParam, userReq *proto.SparkCr
|
||||||
resp.Desc = string(outlineStr) //大纲信息
|
resp.Desc = string(outlineStr) //大纲信息
|
||||||
service.CreateAIStreamMsg(base.UserID, base.ModelID, int(base.SessionID), resp, modelParam.Model) //保存消息
|
service.CreateAIStreamMsg(base.UserID, base.ModelID, int(base.SessionID), resp, modelParam.Model) //保存消息
|
||||||
var respStr []byte
|
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 {
|
if resp.Code != 0 {
|
||||||
log.Println("Spark create ppt by outline Error:", resp)
|
log.Println("Spark create ppt by outline Error:", resp)
|
||||||
return
|
return
|
||||||
|
|
@ -375,12 +380,6 @@ func SparkDoGetPPTInfoBySID(modelParam *proto.ModelParam, userReq *proto.SparkCr
|
||||||
log.Println("spark create ppt by outline success,msg id:", userMsgID)
|
log.Println("spark create ppt by outline success,msg id:", userMsgID)
|
||||||
return
|
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))
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue