添加获取ppt状态错误处理及日志输出
This commit is contained in:
parent
4383dede66
commit
0f3baa0147
|
|
@ -544,8 +544,9 @@ func GetSparkCreatePPTStatus(c *gin.Context) {
|
|||
//从redis获取
|
||||
key := fmt.Sprintf("user-%d-session-%d-create-pptx", userID, req.SessionID)
|
||||
status := worker.GetRedis(key)
|
||||
log.Println("get redis key:", key, "\t,status:", status)
|
||||
if status == "" {
|
||||
c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": nil})
|
||||
c.JSON(http.StatusOK, gin.H{"code": proto.GetSparkCreatePPTStatusFailed, "message": "status is null", "data": nil})
|
||||
return
|
||||
}
|
||||
var resp proto.SparkCreatePPTByOutlineResponse
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ const (
|
|||
FuncModelUpdateFailed = 131 // 更新功能模型失败
|
||||
FuncModelDeleteFailed = 132 // 删除功能模型失败
|
||||
FuncModelSearchFailed = 133 // 获取功能模型失败
|
||||
|
||||
GetSparkCreatePPTStatusFailed = 140 // 获取spark创建ppt状态失败
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
Loading…
Reference in New Issue