Browse Source

no message

xingzai 1 year ago
parent
commit
796c0e3e21
1 changed files with 16 additions and 1 deletions
  1. 16 1
      controllers/user.go

+ 16 - 1
controllers/user.go

@@ -909,6 +909,17 @@ func (this *UserController) ApplyTryOut() {
 		title = microAudio.VoiceName
 		sourceId = microAudio.ActivityId
 		source = "activityvoice"
+	} else if tryType == "ActivityVideo" {
+		// 活动视频
+		activityVideo, e := models.GetCygxActivityVideoById(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "微路演音频信息有误, 不存在的VoiceId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = activityVideo.VideoName
+		sourceId = activityVideo.ActivityId
+		source = "activityvideo"
 	} else if tryType == "MicroVideo" {
 		// 微路演视频
 		microVideo, e := models.GetMicroRoadshowVideoById(detailId)
@@ -918,6 +929,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = microVideo.VideoName
+		source = "roadshow"
 	} else if tryType == "Researchsummary" {
 		// 本周研究汇总
 		ResearchSummaryInfo, e := models.GetCygxResearchSummaryInfoById(detailId)
@@ -927,6 +939,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ResearchSummaryInfo.Title
+		source = "researchsummary"
 	} else if tryType == "Minutessummary" {
 		// 上周纪要汇总
 		MinutesSummaryInfo, e := models.GetCygxMinutesSummaryInfoById(detailId)
@@ -936,6 +949,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = MinutesSummaryInfo.Title
+		source = "minutessummary"
 	} else if tryType == "ReportSelection" {
 		// 报告精选
 		ReportSelectionInfo, e := models.GetCygxReportSelectionInfoById(detailId)
@@ -945,6 +959,7 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ReportSelectionInfo.Title
+		source = "reportselection"
 	} else if tryType == "ProductInterior" {
 		// 产品内测
 		ProductInteriorDetail, e := models.GetCygxProductInteriorDetail(detailId)
@@ -954,9 +969,9 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = ProductInteriorDetail.Title
+		source = "productinterior"
 	}
 
-	fmt.Println(title)
 	//缓存校验
 	cacheKey := fmt.Sprint("xygx:apply_record:add:", uid)
 	ttlTime := utils.Rc.GetRedisTTL(cacheKey)