Browse Source

no message

xingzai 1 năm trước cách đây
mục cha
commit
ebb872c1bf

+ 29 - 29
controllers/cygx/activity_video.go

@@ -433,7 +433,7 @@ func (this *ActivityVideoCoAntroller) VideoAndVoice() {
 // @Param   EndDate   query   string  false       "结束时间,列如2021-03-06 "
 // @Param   KeyWord   query   string  false       "搜索关键词"
 // @Param   SortType          query   string    false		"排序顺序:asc、desc"
-// @Param   SearchType          query   int    false		"类型 1 路演反馈 ,2:调研反馈"
+// @Param   SearchType          query   int    false		"类型 1 路演回放 ,2:调研反馈"
 // @Success 200 {object} cygx.CygxActivityVideoListRep
 // @router /activity_voice_and_video/list [get]
 func (this *ActivityVideoCoAntroller) ActivityVoiceAndVideoList() {
@@ -490,9 +490,9 @@ func (this *ActivityVideoCoAntroller) ActivityVoiceAndVideoList() {
 	}
 	//类型 1 路演反馈 ,2:调研反馈
 	if searchType == 1 {
-		condition += ` AND art.activity_type_id =  2  AND  art.yidong_activity_id_by_cygx != '' `
+		condition += ` AND art.activity_type_id IN (2,7)   AND  art.is_yidong_conduct = 1 `
 	} else if searchType == 2 {
-		condition += ` AND art.activity_type_id !=  2  `
+		condition += ` AND  (	  art.activity_type_id NOT IN (2,7)  OR  art.is_yidong_conduct = 0)  `
 	}
 
 	var conditionOrder string
@@ -546,36 +546,36 @@ func (this *ActivityVideoCoAntroller) ActivityVoiceAndVideoList() {
 				mapIndustrial[v.ActivityId] += v.IndustryName + ","
 			}
 		}
-	}
 
-	//处理音视文件标识
-	mapVoice := make(map[int]bool)
-	var conditionVoice string
-	var parsVoice []interface{}
-	conditionVoice = " AND activity_id IN (" + activityIds + ")  "
-	listVoice, err := cygx.GetActivityVoiceList(conditionVoice, parsVoice)
-	if err != nil && err.Error() != utils.ErrNoRow() {
-		br.Msg = "获取失败"
-		br.ErrMsg = "获取数据失败,Err:" + err.Error()
-		return
-	}
-	if len(listVoice) > 0 {
-		for _, v := range listVoice {
-			mapVoice[v.ActivityId] = true
+		//处理音视文件标识
+		mapVoice := make(map[int]bool)
+		var conditionVoice string
+		var parsVoice []interface{}
+		conditionVoice = " AND activity_id IN (" + activityIds + ")  "
+		listVoice, err := cygx.GetActivityVoiceList(conditionVoice, parsVoice)
+		if err != nil && err.Error() != utils.ErrNoRow() {
+			br.Msg = "获取失败"
+			br.ErrMsg = "获取数据失败,Err:" + err.Error()
+			return
 		}
-	}
-	for k, v := range list {
-		if mapIndustrial[v.ActivityId] != "" && v.TemporaryLabel == "" {
-			list[k].Label = strings.TrimRight(mapIndustrial[v.ActivityId], ",")
+		if len(listVoice) > 0 {
+			for _, v := range listVoice {
+				mapVoice[v.ActivityId] = true
+			}
 		}
-		if mapVoice[v.ActivityId] {
-			v.FileName = "音频"
-		} else {
-			v.FileName = "视频"
+		for k, v := range list {
+			if mapIndustrial[v.ActivityId] != "" && v.TemporaryLabel == "" {
+				list[k].Label = strings.TrimRight(mapIndustrial[v.ActivityId], ",")
+			}
+			if mapVoice[v.ActivityId] {
+				v.FileName = "音频"
+			} else {
+				v.FileName = "视频"
+			}
+		}
+		if len(list) == 0 {
+			list = make([]*cygx.CygxActivityVideoListResp, 0)
 		}
-	}
-	if len(list) == 0 {
-		list = make([]*cygx.CygxActivityVideoListResp, 0)
 	}
 
 	page := paging.GetPaging(currentIndex, pageSize, total)

+ 4 - 0
controllers/cygx/micro_roadshow.go

@@ -514,6 +514,10 @@ func (this *MicroRoadshowController) Deatil() {
 		br.ErrMsg = "获取历史详情失败,Err:" + err.Error()
 		return
 	}
+
+	for _, v := range list {
+		v.RegisterPlatform = utils.CYGX_REGISTER_PLATFORM_MAP[v.RegisterPlatform]
+	}
 	//resp := new(cygx.MicroRoadshowVideoHistoryListResp)
 	//page := paging.GetPaging(currentIndex, pageSize, total)
 	//resp.List = list

+ 13 - 12
models/cygx/micro_roadshow.go

@@ -139,18 +139,19 @@ func PublishVideoCancel(videoId, publishOrCancle int) (err error) {
 }
 
 type CygxMicroRoadshowVideoHistory struct {
-	Id          int       `orm:"column(id);pk"description:"微路演视频浏览记录表id"`
-	VideoId     int       `description:"微路演视频id"`
-	UserId      int       `description:"用户id"`
-	Mobile      string    `description:"手机号"`
-	Email       string    `description:"邮箱"`
-	CompanyId   int       `description:"公司Id"`
-	CompanyName string    `description:"公司名称"`
-	RealName    string    `description:"用户实际名称"`
-	SellerName  string    `description:"所属销售"`
-	PlaySeconds string    `description:"播放时间 单位s"`
-	CreateTime  string    `description:"视频创建时间"`
-	ModifyTime  time.Time `description:"视频修改时间"`
+	Id               int       `orm:"column(id);pk"description:"微路演视频浏览记录表id"`
+	VideoId          int       `description:"微路演视频id"`
+	UserId           int       `description:"用户id"`
+	Mobile           string    `description:"手机号"`
+	Email            string    `description:"邮箱"`
+	CompanyId        int       `description:"公司Id"`
+	CompanyName      string    `description:"公司名称"`
+	RealName         string    `description:"用户实际名称"`
+	SellerName       string    `description:"所属销售"`
+	PlaySeconds      string    `description:"播放时间 单位s"`
+	CreateTime       string    `description:"视频创建时间"`
+	ModifyTime       time.Time `description:"视频修改时间"`
+	RegisterPlatform string    `description:"来源 1小程序,2:网页"`
 }
 
 func GetMicroRoadshowVideoHistoryByIdPage(condition string, pars []interface{}, startSize, pageSize int) (item []*CygxMicroRoadshowVideoHistory, err error) {