瀏覽代碼

fix:章节详情,手工上传的音频才返回

Roc 5 月之前
父節點
當前提交
b19aa39d08

+ 1 - 0
models/tables/rddp/report/report.go

@@ -36,6 +36,7 @@ type Report struct {
 	CanvasColor        string    `description:"画布颜色" json:"canvas_color"`
 	HeadResourceId     int       `description:"版头资源ID" json:"head_resource_id"`
 	EndResourceId      int       `description:"版尾资源ID" json:"end_resource_id"`
+	VoiceGenerateType  int8      `description:"音频生成方式,0:系统生成,1:人工上传" json:"voice_generate_type"`
 }
 
 type UnReadItem struct {

+ 1 - 0
models/tables/rddp/report_chapter/report_chapter.go

@@ -29,6 +29,7 @@ type ReportChapter struct {
 	CreateTime        time.Time `gorm:"column:create_time;type:datetime"  json:"create_time"`                                       //创建时间
 	ModifyTime        time.Time `gorm:"column:modify_time;type:datetime"  json:"modify_time"`                                       //修改时间
 	ReportLayout      int8      `description:"报告布局,1:常规布局,2:智能布局。默认:1" json:"report_layout"`
+	VoiceGenerateType int8      `description:"音频生成方式,0:系统生成,1:人工上传" json:"voice_generate_type"`
 }
 
 func (r *ReportChapter) TableName() string {

+ 5 - 1
services/report/report_chapter.go

@@ -261,7 +261,11 @@ func GetChapterDetail(user user.UserInfo, reportChapterId int) (reportChapterDet
 	reportChapterItem.HeadImg = reportInfo.HeadImg
 	reportChapterItem.EndImg = reportInfo.EndImg
 	reportChapterItem.CanvasColor = reportInfo.CanvasColor
-	reportChapterItem.ReportVideoUrl = reportInfo.VideoUrl
+
+	// 手工上传的才返回
+	if reportInfo.VoiceGenerateType == 1 {
+		reportChapterItem.ReportVideoUrl = reportInfo.VideoUrl
+	}
 
 	// 版头版尾样式
 	{