Browse Source

no message

xingzai 1 year ago
parent
commit
02c84fb668
3 changed files with 38 additions and 1 deletions
  1. 1 0
      controllers/report_selection.go
  2. 36 0
      controllers/user.go
  3. 1 1
      models/user.go

+ 1 - 0
controllers/report_selection.go

@@ -75,6 +75,7 @@ func (this *ReportSelectionController) Detail() {
 	}
 	resp.HasPermission = hasPermission
 	if hasPermission != 1 || !resp.IsShow {
+		resp.Detail = detail
 		br.Ret = 200
 		br.Success = true
 		br.Msg = "获取成功"

+ 36 - 0
controllers/user.go

@@ -891,6 +891,42 @@ func (this *UserController) ApplyTryOut() {
 			return
 		}
 		title = microVideo.VideoName
+	} else if tryType == "Researchsummary" {
+		// 本周研究汇总
+		ResearchSummaryInfo, e := models.GetCygxResearchSummaryInfoById(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "本周研究汇总信息有误, 不存在的detailId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = ResearchSummaryInfo.Title
+	} else if tryType == "Minutessummary" {
+		// 上周纪要汇总
+		MinutesSummaryInfo, e := models.GetCygxMinutesSummaryInfoById(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "上周纪要汇总信息有误, 不存在的detailId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = MinutesSummaryInfo.Title
+	} else if tryType == "ReportSelection" {
+		// 报告精选
+		ReportSelectionInfo, e := models.GetCygxReportSelectionInfoById(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "报告精选信息有误, 不存在的detailId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = ReportSelectionInfo.Title
+	} else if tryType == "ProductInterior" {
+		// 产品内测
+		ProductInteriorDetail, e := models.GetCygxProductInteriorDetail(detailId)
+		if e != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "产品内测信息有误, 不存在的detailId: " + strconv.Itoa(detailId)
+			return
+		}
+		title = ProductInteriorDetail.Title
 	}
 
 	fmt.Println(title)

+ 1 - 1
models/user.go

@@ -211,7 +211,7 @@ type ApplyTryReq struct {
 	RealName        string `description:"姓名"`
 	CompanyName     string `description:"公司名称"`
 	ApplyMethod     int    `description:"1:已付费客户申请试用,2:非客户申请试用,3:非客户申请试用(ficc下,不需要进行数据校验)"`
-	TryType         string `description:"提交类型,Article:文章、Activity:活动; MicroVideo-微路演视频"`
+	TryType         string `description:"提交类型,Article:文章、Activity:活动、MicroAudio:微路演音频、MicroVideo:微路演视频、Researchsummary:本周研究汇总、Minutessummary:上周纪要汇总、ReportSelection:报告精选、ProductInterior:产品内测"`
 	DetailId        int    `description:"详情ID"`
 }