Browse Source

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into cygx_12.2

xingzai 1 year ago
parent
commit
1eae0e8955
2 changed files with 11 additions and 8 deletions
  1. 10 7
      controllers/activity.go
  2. 1 1
      models/wx_template_msg.go

+ 10 - 7
controllers/activity.go

@@ -413,12 +413,12 @@ func (this *ActivityCoAntroller) Detail() {
 			}
 
 			// 查研观向7.4-行业新标签
-			//industryNewMap, e := services.GetIndustryNewLabelMap(industryIds)
-			//if e != nil {
-			//	br.Msg = "获取信息失败"
-			//	br.ErrMsg = "获取产业新标签失败, Err: " + e.Error()
-			//	return
-			//}
+			industryNewMap, e := services.GetIndustryNewLabelMap(industryIds)
+			if e != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "获取产业新标签失败, Err: " + e.Error()
+				return
+			}
 
 			//判断产业下是否有关联的报告,并处理是否跳转
 			industrialManagementId = strings.TrimRight(industrialManagementId, ",")
@@ -442,7 +442,10 @@ func (this *ActivityCoAntroller) Detail() {
 					if mapIndustrial[v.IndustrialManagementId] > 0 && !industrialList[k].IsResearch {
 						industrialList[k].IsJump = true
 					}
-					//industrialList[k].IndustryNewLabel = industryNewMap[v.IndustrialManagementId]
+					//非买方研选下的才展示New标签
+					if activityInfo.ChartPermissionId != utils.CHART_PERMISSION_ID_YANXUAN {
+						industrialList[k].IndustryNewLabel = industryNewMap[v.IndustrialManagementId]
+					}
 				}
 			}
 		}

+ 1 - 1
models/wx_template_msg.go

@@ -37,7 +37,7 @@ func GetWxOpenIdByMobileList(mobile string) (items []*OpenIdList, err error) {
 	//		WHERE bind_account IN (` + mobile + `) AND create_platform = 4`
 
 	sql := ` SELECT
-				union_id,
+				union_id,open_id,
 				cygx_user_id AS user_id
 				FROM cygx_user_record	WHERE	1 = 1	AND cygx_bind_account IN (` + mobile + `)`
 	_, err = orm.NewOrm().Raw(sql).QueryRows(&items)