|
@@ -100,82 +100,6 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //处理晨会精华
|
|
|
- if len(meetingreviewchaptIds) > 0 {
|
|
|
- //pars = make([]interface{}, 0)
|
|
|
- //condition = ` AND c.id IN (` + utils.GetOrmInReplace(len(meetingreviewchaptIds)) + `)`
|
|
|
- //pars = append(pars, meetingreviewchaptIds)
|
|
|
-
|
|
|
- listrMeet, e := GetCygxMorningMeetingReviewChapterListByIds(meetingreviewchaptIds)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetCygxMorningMeetingReviewChapterListByIds, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- for _, v := range listrMeet {
|
|
|
- v.Content = AnnotationHtml(v.Content)
|
|
|
- v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
|
|
|
- mapItems[fmt.Sprint("meetingreviewchapt", v.Id)].Meetingreviewchapt = v
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //处理上周纪要汇总
|
|
|
- if len(minutessummaryIds) > 0 {
|
|
|
- pars = make([]interface{}, 0)
|
|
|
- condition = ` AND article_id IN (` + utils.GetOrmInReplace(len(minutessummaryIds)) + `)`
|
|
|
- pars = append(pars, minutessummaryIds)
|
|
|
-
|
|
|
- listresearchsummary, e := models.GetReportSelectionListHome(condition, "cygx_minutes_summary", pars, 0, len(minutessummaryIds))
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetResourceDataList, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- mapPv := GetCygxReportHistoryRecordListMap(minutessummaryIds, "szjyhz")
|
|
|
- for _, v := range listresearchsummary {
|
|
|
- v.Pv = mapPv[v.ArticleId]
|
|
|
- v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
|
|
|
- mapItems[fmt.Sprint("minutessummary", v.ArticleId)].Minutessummary = v
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //处理本周纪要汇总
|
|
|
- if len(researchsummaryIds) > 0 {
|
|
|
- pars = make([]interface{}, 0)
|
|
|
- condition = ` AND article_id IN (` + utils.GetOrmInReplace(len(researchsummaryIds)) + `)`
|
|
|
- pars = append(pars, researchsummaryIds)
|
|
|
-
|
|
|
- listresearchsummary, e := models.GetReportSelectionListHome(condition, "cygx_research_summary", pars, 0, len(researchsummaryIds))
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetReportSelectionListHome, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- mapPv := GetCygxReportHistoryRecordListMap(researchsummaryIds, "bzyjhz")
|
|
|
- for _, v := range listresearchsummary {
|
|
|
- v.Pv = mapPv[v.ArticleId]
|
|
|
- v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
|
|
|
- mapItems[fmt.Sprint("researchsummary", v.ArticleId)].Researchsummary = v
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //处理产品内测
|
|
|
- if len(productinteriorIds) > 0 {
|
|
|
- pars = make([]interface{}, 0)
|
|
|
- condition = ` AND art.status = 1 AND art.product_interior_id IN (` + utils.GetOrmInReplace(len(productinteriorIds)) + `)`
|
|
|
- pars = append(pars, productinteriorIds)
|
|
|
- listProductInterior, e := models.GetCygxProductInteriorList(condition, pars, 0, len(productinteriorIds))
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetCygxProductInteriorList, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- ProductInteriorHistoryMap := GetCygxProductInteriorHistoryListPvMap(productinteriorIds)
|
|
|
- for _, v := range listProductInterior {
|
|
|
- v.Body = ProductInteriorHtml(v.Body)
|
|
|
- v.Pv = ProductInteriorHistoryMap[v.ProductInteriorId]
|
|
|
- v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
|
|
|
- mapItems[fmt.Sprint("productinterior", v.ProductInteriorId)].ProductInterior = v
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
detail, e := models.GetConfigByCode("city_img_url")
|
|
|
if e != nil {
|
|
|
err = errors.New("GetResourceDataList, Err: " + e.Error())
|
|
@@ -255,45 +179,6 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //处理专项调研
|
|
|
- if len(activityspecialIds) > 0 {
|
|
|
- pars = make([]interface{}, 0)
|
|
|
- condition = ` AND art.activity_id IN (` + utils.GetOrmInReplace(len(activityspecialIds)) + `)`
|
|
|
- pars = append(pars, activityspecialIds)
|
|
|
- activitySpeciallist, e := models.GetCygxActivitySpecialDetailList(condition, pars, user.UserId, 0, len(activityspecialIds))
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetCygxActivitySpecialDetailList, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- for _, v := range activitySpeciallist {
|
|
|
- if mapChart[v.ChartPermissionName] != "" {
|
|
|
- imgUrlResp = mapChart[v.ChartPermissionName]
|
|
|
- }
|
|
|
-
|
|
|
- if v.Days == 0 {
|
|
|
- v.TripStatus = 1
|
|
|
- v.TripImgLink = v.TripImgLink
|
|
|
- } else {
|
|
|
- v.TripStatus = 2
|
|
|
- v.TripImgLink = v.TripImgLinkFix
|
|
|
- v.ActivityTimeText = v.ActivityTimeTextByDay
|
|
|
- }
|
|
|
- resultTimeStart := utils.StrTimeToTime(v.ActivityTime) //时间字符串格式转时间格式
|
|
|
- resultTimeEnd := utils.StrTimeToTime(v.ActivityTimeEnd) //时间字符串格式转时间格式
|
|
|
- if resultTimeStart.After(time.Now()) {
|
|
|
- v.ActiveState = 1
|
|
|
- } else if time.Now().After(resultTimeEnd) {
|
|
|
- v.ActiveState = 3
|
|
|
- } else {
|
|
|
- v.ActiveState = 2
|
|
|
- }
|
|
|
- v.ImgUrl = imgUrlResp
|
|
|
- mapItems[fmt.Sprint("activityspecial", v.ActivityId)].Activityspecial = v
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if len(roadshowIds)+len(activityvideoIds)+len(activityvoiceIds)+len(askserieVideoIds) > 0 {
|
|
|
|
|
|
audioIdstr := strings.Join(activityvoiceIds, ",")
|
|
@@ -383,27 +268,6 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //处理报告精选
|
|
|
- lenreportselectionIds := len(reportselectionIds)
|
|
|
- if lenreportselectionIds > 0 {
|
|
|
- pars = make([]interface{}, 0)
|
|
|
- condition = ` AND article_id IN (` + utils.GetOrmInReplace(lenreportselectionIds) + `)`
|
|
|
- pars = append(pars, reportselectionIds)
|
|
|
- listreportselection, e := models.GetReportSelectionList(condition, pars, 0, lenreportselectionIds)
|
|
|
- if e != nil {
|
|
|
- err = errors.New("GetReportSelectionList, Err: " + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
- mapPv := GetCygxReportHistoryRecordListMap(reportselectionIds, "bgjx")
|
|
|
- for _, v := range listreportselection {
|
|
|
- v.Title += "(第" + v.Periods + "期)"
|
|
|
- v.MarketStrategy = AnnotationHtml(v.MarketStrategy)
|
|
|
- v.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
|
|
|
- v.Pv = mapPv[v.ArticleId]
|
|
|
- mapItems[fmt.Sprint("reportselection", v.ArticleId)].ReportSelection = v
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//处理研选专栏
|
|
|
lenyanxuanSpecialIds := len(yanxuanSpecialIds)
|
|
|
if lenyanxuanSpecialIds > 0 {
|
|
@@ -415,7 +279,7 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
err = errors.New("GetYanxuanSpecialList, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ yanxuanSpecialPv := GetYanxuanSpecialRecordByYanxuanSpecialId(yanxuanSpecialIds) // 专栏Pv
|
|
|
for _, v := range listyanxuanSpecial {
|
|
|
v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
|
|
|
v.Annotation, _ = GetReportContentTextSubNew(v.Content)
|
|
@@ -423,6 +287,7 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
|
|
|
v.Source = utils.CYGX_OBJ_YANXUANSPECIAL
|
|
|
v.PublishDate = v.PublishTime
|
|
|
v.LabelKeyword = "专栏"
|
|
|
+ v.Pv = yanxuanSpecialPv[v.Id]
|
|
|
v.LabelKeywordImgLink = utils.LABEL_ICO_4
|
|
|
mapItems[fmt.Sprint(utils.CYGX_OBJ_YANXUANSPECIAL, v.Id)].YanxuanSpecial = v
|
|
|
}
|