|
@@ -642,7 +642,7 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
br.Msg = "请输入活动ID"
|
|
|
return
|
|
|
}
|
|
|
- // TODO:【新】标签,【宏观】标签
|
|
|
+
|
|
|
resp := new(models.CygxActivityResp)
|
|
|
hasPermission := 0
|
|
|
var companyDetailStatus string
|
|
@@ -980,7 +980,19 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
}
|
|
|
|
|
|
//处理按钮是否展示问题
|
|
|
- resp.Detail = services.ActivityButtonShow(activityInfo)
|
|
|
+ actDetail := services.ActivityButtonShow(activityInfo)
|
|
|
+
|
|
|
+ // 查研观向7.4-行业新标签
|
|
|
+ actIds := []int{actDetail.ActivityId}
|
|
|
+ newLabelMap, e := services.GetActivityNewLabelMap(actIds)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取活动产业新标签失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ actDetail.IndustryNewLabel = newLabelMap[actDetail.ActivityId]
|
|
|
+
|
|
|
+ resp.Detail = actDetail
|
|
|
}
|
|
|
resp.HasPermission = hasPermission
|
|
|
br.Ret = 200
|
|
@@ -2765,6 +2777,14 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds == "" {
|
|
|
+ chartPermissionIds = "1"
|
|
|
+ } else {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
+
|
|
|
if whichDay == "undefined" {
|
|
|
whichDay = ""
|
|
|
}
|
|
@@ -2980,6 +3000,23 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
if keyWord != "" {
|
|
|
go services.AddActivitykeyWordSearch(keyWord, user)
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-判断标签是否为产业, 为产业时是否跳转资源包
|
|
|
+ if label != "" {
|
|
|
+ sourceIndustry, e := models.GetSourceIndustryByName(label)
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取标签产业资源包失败, Err:" + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if sourceIndustry != nil {
|
|
|
+ resp.IsJump = true
|
|
|
+ if sourceIndustry.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
|
|
|
+ resp.IsResearch = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
resp.Paging = page
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
@@ -3392,6 +3429,7 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
|
|
|
chartPermissionIds := this.GetString("ChartPermissionIds")
|
|
|
whichDay := this.GetString("WhichDay")
|
|
|
activeState := this.GetString("ActiveState")
|
|
|
+
|
|
|
//入参为 undefined 时的处理
|
|
|
if chartPermissionIds == "undefined" {
|
|
|
chartPermissionIds = ""
|
|
@@ -3402,6 +3440,14 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
|
|
|
if activeState == "undefined" || activeState == "" {
|
|
|
activeState = "1"
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds == "" {
|
|
|
+ chartPermissionIds = "1"
|
|
|
+ } else {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
+
|
|
|
//adminIds, err := models.GetSelleridWhichGroup(user.CompanyId, 2)
|
|
|
//if err != nil {
|
|
|
// br.Msg = "获取失败"
|
|
@@ -3435,6 +3481,14 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
|
|
|
permissionNameStr = strings.Replace(permissionNameStr, "(主观)", "", -1)
|
|
|
permissionNameStr = strings.Replace(permissionNameStr, "(客观)", "", -1)
|
|
|
permissionNameStr = strings.TrimRight(permissionNameStr, ",")
|
|
|
+
|
|
|
+ // 查研观向7.4-始终查询宏观的权限(无论是否有权限)
|
|
|
+ if permissionNameStr == `` {
|
|
|
+ permissionNameStr = `'宏观'`
|
|
|
+ } else {
|
|
|
+ permissionNameStr += `, '宏观'`
|
|
|
+ }
|
|
|
+
|
|
|
list, err := models.GetActivityTypeHomeList()
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
@@ -4397,6 +4451,14 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
|
|
|
if activeState == "undefined" || activeState == "" || activeState == "1" {
|
|
|
activeState = "1,2"
|
|
|
}
|
|
|
+
|
|
|
+ // 查研观向7.4-始终查询宏观的活动
|
|
|
+ if chartPermissionIds == "" {
|
|
|
+ chartPermissionIds = "1"
|
|
|
+ } else {
|
|
|
+ chartPermissionIds += ",1"
|
|
|
+ }
|
|
|
+
|
|
|
//adminIds, err := models.GetSelleridWhichGroup(user.CompanyId, 2)
|
|
|
//if err != nil {
|
|
|
// br.Msg = "获取失败"
|
|
@@ -4432,6 +4494,14 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
|
|
|
permissionNameStr = strings.Replace(permissionNameStr, "(主观)", "", -1)
|
|
|
permissionNameStr = strings.Replace(permissionNameStr, "(客观)", "", -1)
|
|
|
permissionNameStr = strings.TrimRight(permissionNameStr, ",")
|
|
|
+
|
|
|
+ // 查研观向7.4-始终查询宏观的权限(无论是否有权限)
|
|
|
+ if permissionNameStr == `` {
|
|
|
+ permissionNameStr = `'宏观'`
|
|
|
+ } else {
|
|
|
+ permissionNameStr += `, '宏观'`
|
|
|
+ }
|
|
|
+
|
|
|
list, err := models.GetActivityTypeHomeListPc()
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|