|
@@ -1595,8 +1595,12 @@ func GetSpecialArticleDetailUserPower(user *models.WxUserItem, articleInfo *mode
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func init() {
|
|
|
+ GetArticNewLabelWhithActivity3Month()
|
|
|
+}
|
|
|
+
|
|
|
//弘则报告发布日期在三个月以内的
|
|
|
-func GetArticNewLabel3Month() (labelMap map[int]bool, err error) {
|
|
|
+func GetArticNewLabelWhithActivity3Month() (labelMap map[int]bool, err error) {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
condition += ` AND publish_date >= ? `
|
|
@@ -1623,8 +1627,25 @@ func GetArticNewLabel3Month() (labelMap map[int]bool, err error) {
|
|
|
return
|
|
|
}
|
|
|
labelMap = make(map[int]bool, 0)
|
|
|
+ var industrialIds []int
|
|
|
for _, v := range industrialList {
|
|
|
- labelMap[v.IndustrialManagementId] = true
|
|
|
+ industrialIds = append(industrialIds, v.IndustrialManagementId)
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取活动关联的产业
|
|
|
+ var groupCond string
|
|
|
+ var groupPars []interface{}
|
|
|
+ groupCond += ` AND b.industrial_management_id IN (` + utils.GetOrmInReplace(len(industrialIds)) + `) AND b.source = 1 `
|
|
|
+ groupPars = append(groupPars, industrialIds)
|
|
|
+ groups, e := models.GetActivityIndustryRelationList(groupCond, groupPars)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取活动产业关联列表失败, Err: " + e.Error())
|
|
|
+ return
|
|
|
}
|
|
|
+ for _, v := range groups {
|
|
|
+ labelMap[v.ActivityId] = true
|
|
|
+ }
|
|
|
+
|
|
|
+ fmt.Println(labelMap[89])
|
|
|
return
|
|
|
}
|