|
@@ -94,6 +94,10 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds != "" {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
if activityTypeIds == "undefined" {
|
|
|
activityTypeIds = ""
|
|
|
}
|
|
@@ -887,22 +891,24 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
item.IndustryName = activityInfo.Label
|
|
|
industrialList = append(industrialList, item)
|
|
|
} else {
|
|
|
- // 查研观向7.4-行业新标签
|
|
|
- actIds := []int{activityId}
|
|
|
- _, industryNewMap, e := services.GetActivityNewLabelMap(actIds)
|
|
|
- if e != nil {
|
|
|
- br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "获取活动产业新标签失败, Err: " + e.Error()
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
+ industryIds := make([]int, 0)
|
|
|
var industrialManagementId string
|
|
|
for k, v := range industrialList {
|
|
|
if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
|
|
|
industrialList[k].IsResearch = true
|
|
|
}
|
|
|
+ industryIds = append(industryIds, v.IndustrialManagementId)
|
|
|
industrialManagementId += strconv.Itoa(v.IndustrialManagementId) + ","
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-行业新标签
|
|
|
+ industryNewMap, e := services.GetIndustryNewLabelMap(industryIds)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取产业新标签失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//判断产业下是否有关联的报告,并处理是否跳转
|
|
|
industrialManagementId = strings.TrimRight(industrialManagementId, ",")
|
|
|
if industrialManagementId != "" {
|
|
@@ -1991,6 +1997,10 @@ func (this *ActivityCoAntroller) LabelList() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds != "" {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
if activityTypeIds == "undefined" {
|
|
|
activityTypeIds = ""
|
|
|
}
|
|
@@ -2344,6 +2354,10 @@ func (this *ActivityCoAntroller) LabelTypeList() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds != "" {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
if whichDay == "undefined" {
|
|
|
whichDay = ""
|
|
|
}
|
|
@@ -2715,7 +2729,6 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
-
|
|
|
// 查研观向7.4-始终查询宏观的活动
|
|
|
if chartPermissionIds != "" {
|
|
|
chartPermissionIds += ",1"
|
|
@@ -2876,6 +2889,15 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
if sourceIndustry.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
|
|
|
resp.IsResearch = true
|
|
|
}
|
|
|
+ // 产业新标签
|
|
|
+ industryIds := []int{sourceIndustry.IndustrialManagementId}
|
|
|
+ industryNewMap, e := services.GetIndustryNewLabelMap(industryIds)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取产业新标签失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp.IndustryNewLabel = industryNewMap[sourceIndustry.IndustrialManagementId]
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2918,6 +2940,10 @@ func (this *ActivityCoAntroller) LabelTypeListPc() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds != "" {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
if whichDay == "undefined" {
|
|
|
whichDay = ""
|
|
|
}
|
|
@@ -4302,6 +4328,10 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds != "" {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
if whichDay == "undefined" {
|
|
|
whichDay = ""
|
|
|
}
|
|
@@ -4309,11 +4339,6 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
|
|
|
activeState = "1,2"
|
|
|
}
|
|
|
|
|
|
- // 查研观向7.4-始终查询宏观的活动
|
|
|
- if chartPermissionIds != "" {
|
|
|
- chartPermissionIds += ",1"
|
|
|
- }
|
|
|
-
|
|
|
//adminIds, err := models.GetSelleridWhichGroup(user.CompanyId, 2)
|
|
|
//if err != nil {
|
|
|
// br.Msg = "获取失败"
|
|
@@ -4462,17 +4487,41 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
|
|
|
itemList.ImgUrlBgPc = "https://hzstatic.hzinsights.com/static/temp/20220707202207/20220707/rFwAM1c4fIMJM0EGoUkUYl25XH9L.png"
|
|
|
list = append(list, itemList)
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-活动【新】标签
|
|
|
+ activityIds := make([]int, 0)
|
|
|
+ for _, v := range list {
|
|
|
+ if len(v.List) > 0 {
|
|
|
+ for i := range v.List {
|
|
|
+ activityIds = append(activityIds, v.List[i].ActivityId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ newLabelMap, _, e := services.GetActivityNewLabelMap(activityIds)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取活动【新】标签Map失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for k := range list {
|
|
|
+ for k2 := range list[k].List {
|
|
|
+ list[k].List[k2].IsNew = newLabelMap[list[k].List[k2].ActivityId]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//记录用户搜索的筛选条件
|
|
|
- item := new(models.CygxActivitySearchHistory)
|
|
|
- item.UserId = user.UserId
|
|
|
- item.Mobile = user.Mobile
|
|
|
- item.CompanyId = user.CompanyId
|
|
|
- item.CompanyName = user.CompanyName
|
|
|
- item.CreateTime = time.Now()
|
|
|
- item.ChartPermissionIds = chartPermissionIds
|
|
|
- item.IsPower = isPower
|
|
|
- item.WhichDay = whichDay
|
|
|
- go models.AddCygxActivitySearchHistory(item)
|
|
|
+ {
|
|
|
+ item := new(models.CygxActivitySearchHistory)
|
|
|
+ item.UserId = user.UserId
|
|
|
+ item.Mobile = user.Mobile
|
|
|
+ item.CompanyId = user.CompanyId
|
|
|
+ item.CompanyName = user.CompanyName
|
|
|
+ item.CreateTime = time.Now()
|
|
|
+ item.ChartPermissionIds = chartPermissionIds
|
|
|
+ item.IsPower = isPower
|
|
|
+ item.WhichDay = whichDay
|
|
|
+ go models.AddCygxActivitySearchHistory(item)
|
|
|
+ }
|
|
|
|
|
|
resp.List = list
|
|
|
br.Ret = 200
|