From 5fd12a447ea1b7f871acc49b46b27514c48eee0a Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Thu, 3 Apr 2025 13:35:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96ppt?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 811170c..fda8380 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -4,6 +4,7 @@ import ( "StuAcaWorksAI/dao" "StuAcaWorksAI/proto" "StuAcaWorksAI/service" + "StuAcaWorksAI/service/spark" "StuAcaWorksAI/worker" "encoding/json" "fmt" @@ -444,8 +445,12 @@ func GetSparkPPTThemeList(c *gin.Context) { modelParam.Url = model.Url modelParam.System = funcs[0].Info //系统功能 //获取主题列表 - themeList, err := service.SparkPPTThemeList(&modelParam, req) - + themeList, err2 := spark.SparkPPTThemeList(&modelParam, req) + if err2 != nil { + c.JSON(http.StatusOK, gin.H{"error": "get spark ppt theme list error", "code": proto.ParameterError, "message": "failed"}) + return + } + c.JSON(http.StatusOK, gin.H{"code": proto.SuccessCode, "message": "success", "data": themeList}) } else { c.JSON(http.StatusOK, gin.H{"error": "parameter error", "code": proto.ParameterError, "message": "failed"}) return