|
@@ -694,3 +694,41 @@ func GetLyjhTypeMap() (mapResp map[int]int, err error) {
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// GetLyjhArticleMap 获取路演精华对应文章ID
|
|
|
+func GetLyjhArticleMap() (mapResp map[int]bool, err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ go utils.SendAlarmMsg("获取路演精华对应文章ID失败 ErrMsg:"+err.Error(), 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ condition := " AND match_type_name = '路演精华' "
|
|
|
+ var pars []interface{}
|
|
|
+ list, e := models.GetReportMappingList(condition, pars)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var categoryId []int
|
|
|
+ mapResp = make(map[int]bool, 0)
|
|
|
+ if len(list) > 0 {
|
|
|
+ for _, v := range list {
|
|
|
+ categoryId = append(categoryId, v.CategoryId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ lencategoryId := len(categoryId)
|
|
|
+ if lencategoryId > 0 {
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
+ condition = ` AND a.category_id IN (` + utils.GetOrmInReplace(lencategoryId) + `)`
|
|
|
+ pars = append(pars, categoryId)
|
|
|
+ listArticle, e := models.GetHomeList(condition, pars, 0, 1000)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ err = errors.New("GetResourceDataList, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range listArticle {
|
|
|
+ mapResp[v.ArticleId] = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|