|
@@ -308,6 +308,7 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
var industrialResourceIdsHz []int // 弘则产业资源包
|
|
|
var industrialResourceIdsYx []int // 研选产业资源包
|
|
|
var yanxuanSpecialIds []int // 研选专栏
|
|
|
+ var askserieVideoIds []string //问答系列视频
|
|
|
//Source string `description:"资源类型 报告 :article 、图表 :newchart、微路演 :roadshow、活动 :activity、活动视频:activityvideo、活动音频:activityvoice、专项调研活动:activityspecial 、 本周研究汇总: researchsummary 、 上周纪要汇总 :minutessummary 、晨会精华 :meetingreviewchapt 、 产品内测:productinterior
|
|
|
for _, v := range list {
|
|
|
if v.Source == "article" {
|
|
@@ -338,6 +339,8 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
industrialResourceIdsYx = append(industrialResourceIdsYx, v.SourceId)
|
|
|
} else if v.Source == utils.CYGX_OBJ_YANXUANSPECIAL {
|
|
|
yanxuanSpecialIds = append(yanxuanSpecialIds, v.SourceId)
|
|
|
+ } else if v.Source == utils.CYGX_OBJ_ASKSERIEVIDEO {
|
|
|
+ askserieVideoIds = append(askserieVideoIds, strconv.Itoa(v.SourceId))
|
|
|
}
|
|
|
}
|
|
|
detail, e := models.GetConfigByCode("city_img_url")
|
|
@@ -659,51 +662,19 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
}
|
|
|
|
|
|
//处理路演 处理路活动视频 处理路活音频
|
|
|
- if len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds) > 0 {
|
|
|
+ if len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds)+len(askserieVideoIds) > 0 {
|
|
|
|
|
|
audioIdstr := strings.Join(activityvoiceIds, ",")
|
|
|
- ideoIdsStr := strings.Join(roadshowIds, ",")
|
|
|
activityVideoIdsStr := strings.Join(activityvideoIds, ",")
|
|
|
+ roadshowIdsStr := strings.Join(roadshowIds, ",")
|
|
|
+ askserieVideoIdsStr := strings.Join(askserieVideoIds, ",")
|
|
|
|
|
|
- list, _, e := GetMicroRoadShowMycollect(len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds), 0, audioIdstr, ideoIdsStr, activityVideoIdsStr)
|
|
|
+ list, _, e := GetMicroRoadShowMycollectV12(len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds)+len(askserieVideoIds), 0, audioIdstr, activityVideoIdsStr, roadshowIdsStr, askserieVideoIdsStr, user)
|
|
|
if e != nil {
|
|
|
- err = errors.New("GetMicroRoadShowMycollect, Err: " + e.Error())
|
|
|
+ err = errors.New("GetMicroRoadShowMycollectV12, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("list", list)
|
|
|
- for _, item := range list {
|
|
|
- if item.Type == 1 {
|
|
|
- //音频
|
|
|
- count, e := models.GetVoiceCollectCount(user.UserId, item.Id)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetVoiceCollectCount, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- if count > 0 {
|
|
|
- item.IsCollect = true
|
|
|
- }
|
|
|
- } else if item.Type == 2 {
|
|
|
- //活动视频
|
|
|
- count, e := models.GetActivityVideoCollectCount(user.UserId, item.Id)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetActivityVideoCollectCount, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- if count > 0 {
|
|
|
- item.IsCollect = true
|
|
|
- }
|
|
|
- } else if item.Type == 3 {
|
|
|
- //微路演视频
|
|
|
- count, e := models.GetVideoCollectCount(user.UserId, item.Id)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetVideoCollectCount, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- if count > 0 {
|
|
|
- item.IsCollect = true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
// 用户权限
|
|
|
authInfo, permissionArr, e := GetUserRaiPermissionInfo(user.UserId, user.CompanyId)
|
|
|
if e != nil {
|
|
@@ -774,6 +745,8 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
mapItems[fmt.Sprint("activityvideo", item.Id)].Activityvideo = item
|
|
|
} else if item.Type == 3 {
|
|
|
mapItems[fmt.Sprint("roadshow", item.Id)].Roadshow = item
|
|
|
+ } else if item.Type == 4 {
|
|
|
+ mapItems[fmt.Sprint(utils.CYGX_OBJ_ASKSERIEVIDEO, item.Id)].AskserieVideo = item
|
|
|
}
|
|
|
}
|
|
|
}
|