瀏覽代碼

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 年之前
父節點
當前提交
99869ad23e
共有 3 個文件被更改,包括 10 次插入6 次删除
  1. 4 4
      controllers/activity.go
  2. 2 1
      models/activity.go
  3. 4 1
      services/activity.go

+ 4 - 4
controllers/activity.go

@@ -3337,7 +3337,7 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
 		}
 		//标签字段关联的产业与标签处理
 		for k2, v2 := range labelList {
-			labelList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName)
+			labelList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName, v2.TemporaryLabel)
 			labelList[k2].ImgUrlBg = v.ImgUrlBgs
 		}
 		list[k].List = labelList
@@ -3382,7 +3382,7 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
 			return
 		}
 		for k2, v2 := range specialList {
-			specialList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName)
+			specialList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName, v2.TemporaryLabel)
 			specialList[k2].ImgUrlBg = "https://hzstatic.hzinsights.com/static/temp/20220426202204/20220426/XDLLsjC9XAAy8LIzQr7GsjrBbtX6.png"
 		}
 
@@ -4321,7 +4321,7 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
 		}
 		//标签字段关联的产业与标签处理
 		for k2, v2 := range labelList {
-			labelList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName)
+			labelList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName, v2.TemporaryLabel)
 			labelList[k2].Resource = 1
 		}
 		list[k].List = labelList
@@ -4365,7 +4365,7 @@ func (this *ActivityCoAntroller) LabelTypeListV6Pc() {
 			return
 		}
 		for k2, v2 := range specialList {
-			specialList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName)
+			specialList[k2].KeyWord = services.LabelStrV5(v2.KeyWord, v2.IsShowSubjectName, v2.TemporaryLabel)
 			specialList[k2].Resource = 2
 		}
 

+ 2 - 1
models/activity.go

@@ -593,12 +593,13 @@ type CygxActivityLabelList struct {
 	ActivityId        int    `description:"活动ID "`
 	IsShowSubjectName int    `description:"小程序内是否展示标的名称 1是 ,0否 默认0 "`
 	Resource          int    `description:"位置 ,1:活动 ,2:专项产业调研"`
+	TemporaryLabel    string `description:"临时标签"`
 }
 
 //主题列表
 func GetActivityLabelListAll(condition, sortTime string, pars []interface{}, startSize, pageSize int) (items []*CygxActivityLabelList, err error) {
 	o := orm.NewOrm()
-	sql := `SELECT	label,is_show_subject_name, MAX( art.activity_time ) AS timesort, MIn( art.activity_time ) AS mintimesort 
+	sql := `SELECT	label,temporary_label,is_show_subject_name, MAX( art.activity_time ) AS timesort, MIn( art.activity_time ) AS mintimesort 
 		FROM cygx_activity as art WHERE 1= 1 `
 	if condition != "" {
 		sql += condition

+ 4 - 1
services/activity.go

@@ -739,7 +739,7 @@ func LabelStr(label string) (labelNew string) {
 }
 
 //5.3版本活动标签字符串处理
-func LabelStrV5(label string, isShowSubjectName int) (labelNew string) {
+func LabelStrV5(label string, isShowSubjectName int, temporaryLabel string) (labelNew string) {
 	slicebr := strings.Split(label, "-")
 	if len(slicebr) > 1 {
 		if isShowSubjectName == 1 {
@@ -750,6 +750,9 @@ func LabelStrV5(label string, isShowSubjectName int) (labelNew string) {
 	} else {
 		labelNew = label
 	}
+	if temporaryLabel != "" {
+		labelNew = temporaryLabel
+	}
 	return labelNew
 }