ziwen 2 سال پیش
والد
کامیت
59257072e7
2فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 9 3
      controller/voice_broadcast/voice_broadcast.go
  2. 1 0
      routers/voice_broadcast.go

+ 9 - 3
controller/voice_broadcast/voice_broadcast.go

@@ -1,18 +1,23 @@
 package voice_broadcast
 
 import (
+	"fmt"
 	"github.com/gin-gonic/gin"
 	"hongze/hongze_yb/controller/response"
+	"hongze/hongze_yb/global"
 	"hongze/hongze_yb/models/request"
 	voiceResp "hongze/hongze_yb/models/response"
 	"hongze/hongze_yb/services"
 	"hongze/hongze_yb/services/user"
 	"hongze/hongze_yb/utils"
+	"io/ioutil"
+	"os"
+	"path"
+	"time"
 )
 
-// QuestionList 问答列表
-// @Tags 问答社区模块
-// @Description 获取问答列表
+// BroadcastList
+// @Description 语音播报列表
 // @Param page_index			query int false "页码"
 // @Param page_size				query int false "每页数量"
 // @Param broadcast_id			query int false "语音播报id"
@@ -50,3 +55,4 @@ func BroadcastList(c *gin.Context) {
 	resp.IsVoiceAdmin = isVoiceAdmin
 	response.OkData("获取成功", resp, c)
 }
+

+ 1 - 0
routers/voice_broadcast.go

@@ -9,5 +9,6 @@ import (
 func InitVoiceBroadcast(r *gin.Engine)  {
 	rGroup := r.Group("api/voice/broadcast").Use(middleware.Token())
 	rGroup.POST("/list", voice_broadcast.BroadcastList)
+	rGroup.POST("/add", voice_broadcast.AddBroadcast)
 }