Browse Source

fix:报告审批通过后,章节类型的报告生成音频

Roc 8 months ago
parent
commit
f0c64b363c
2 changed files with 3 additions and 3 deletions
  1. 2 2
      controllers/report_approve/report_approve_flow.go
  2. 1 1
      services/report_v2.go

+ 2 - 2
controllers/report_approve/report_approve_flow.go

@@ -206,7 +206,7 @@ func (this *ReportApproveFlowController) Add() {
 		br.ErrMsg = fmt.Sprintf("审批流报告类型有误, ReportType: %d", req.ReportType)
 		return
 	}
-	if req.ClassifyFirstId <= 0 || req.ClassifySecondId <= 0 {
+	if req.ClassifyFirstId <= 0 && req.ClassifySecondId <= 0 && req.ClassifyThirdId <= 0 {
 		br.Msg = "请选择报告分类"
 		return
 	}
@@ -345,7 +345,7 @@ func (this *ReportApproveFlowController) Edit() {
 		br.ErrMsg = fmt.Sprintf("审批流报告类型有误, ReportType: %d", req.ReportType)
 		return
 	}
-	if req.ClassifyFirstId <= 0 || req.ClassifySecondId <= 0 {
+	if req.ClassifyFirstId <= 0 && req.ClassifySecondId <= 0 && req.ClassifyThirdId <= 0 {
 		br.Msg = "请选择报告分类"
 		return
 	}

+ 1 - 1
services/report_v2.go

@@ -1353,7 +1353,7 @@ func UpdateReportVideo(reportInfo *models.Report) {
 			return
 		}
 		for _, chapter := range chapterList {
-			if chapter.PublishState == 1 {
+			if chapter.PublishState == 2 {
 				reportChapterIdList = append(reportChapterIdList, chapter.ReportChapterId)
 			}
 		}