Bläddra i källkod

fix:手工上传音频得标记下

Roc 7 månader sedan
förälder
incheckning
ec8485d933
4 ändrade filer med 6 tillägg och 2 borttagningar
  1. 2 1
      controllers/report_chapter.go
  2. 2 1
      controllers/voice.go
  3. 1 0
      models/report.go
  4. 1 0
      models/report_chapter.go

+ 2 - 1
controllers/report_chapter.go

@@ -1231,8 +1231,9 @@ func (this *ReportController) VoiceUpload() {
 		reportChapterInfo.VideoKind = 1
 		reportChapterInfo.LastModifyAdminId = this.SysUser.AdminId
 		reportChapterInfo.LastModifyAdminName = this.SysUser.RealName
+		reportInfo.VoiceGenerateType = 1
 		reportChapterInfo.ModifyTime = time.Now()
-		err = reportChapterInfo.UpdateChapter([]string{"VideoUrl", "VideoName", "VideoPlaySeconds", "VideoSize", "VideoKind", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime"})
+		err = reportChapterInfo.UpdateChapter([]string{"VideoUrl", "VideoName", "VideoPlaySeconds", "VideoSize", "VideoKind", "LastModifyAdminId", "LastModifyAdminName", "VoiceGenerateType", "ModifyTime"})
 		if err != nil {
 			br.Msg = "上传失败"
 			br.ErrMsg = "修改报告章节的音频信息失败,Err:" + err.Error()

+ 2 - 1
controllers/voice.go

@@ -150,8 +150,9 @@ func (this *VoiceController) Upload() {
 		reportInfo.VideoSize = sizeStr
 		reportInfo.LastModifyAdminId = this.SysUser.AdminId
 		reportInfo.LastModifyAdminName = this.SysUser.RealName
+		reportInfo.VoiceGenerateType = 1
 		reportInfo.ModifyTime = time.Now()
-		err = reportInfo.UpdateReport([]string{"VideoUrl", "VideoName", "VideoPlaySeconds", "VideoSize", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime"})
+		err = reportInfo.UpdateReport([]string{"VideoUrl", "VideoName", "VideoPlaySeconds", "VideoSize", "LastModifyAdminId", "LastModifyAdminName", "VoiceGenerateType", "ModifyTime"})
 		if err != nil {
 			br.Msg = "上传失败"
 			br.ErrMsg = "修改报告的音频信息失败,Err:" + err.Error()

+ 1 - 0
models/report.go

@@ -86,6 +86,7 @@ type Report struct {
 	IsPublicPublish     int8      `description:"是否公开发布,1:是,2:否"`
 	ReportCreateTime    time.Time `description:"报告时间创建时间"`
 	InheritReportId     int       `description:"待继承的报告ID"`
+	VoiceGenerateType   int       `description:"音频生成方式,0:系统生成,1:人工上传"`
 }
 
 type ReportList struct {

+ 1 - 0
models/report_chapter.go

@@ -42,6 +42,7 @@ type ReportChapter struct {
 	ContentModifyTime   time.Time `description:"内容更新时间"`
 	ReportLayout        int8      `description:"报告布局,1:常规布局,2:智能布局。默认:1"`
 	ReportCreateTime    time.Time `description:"报告时间创建时间"`
+	VoiceGenerateType   int       `description:"音频生成方式,0:系统生成,1:人工上传"`
 }
 
 // ReportChapterItem 报告章节详情