Browse Source

Merge branch 'cygx_9.1' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 years ago
parent
commit
1492aa4e4a
2 changed files with 4 additions and 1 deletions
  1. 2 1
      services/activity.go
  2. 2 0
      services/activity_special.go

+ 2 - 1
services/activity.go

@@ -502,6 +502,7 @@ func GetHavePower(activityInfo *models.ActivityDetail, permissionStr, companyDet
 // @Param   KeyWord   query   string  false       "搜索关键词 多个用 , 隔开"
 // @Param   ikType   query   int  false       "联想词类型 , 1不做联想,2,做除初始词的联想,3所有联想"
 func GetActivityonditionList(user *models.WxUserItem, activityTypeId, chartPermissionIds, whichDay, activeState, label string, isPower, source int, keyWord string, playBack, ikType int) (conditionActivity string, err error) {
+	keyWordNoIk := keyWord
 	adminIds, err := models.GetSelleridWhichGroup(user.CompanyId, 2)
 	if err != nil {
 		return
@@ -632,12 +633,12 @@ func GetActivityonditionList(user *models.WxUserItem, activityTypeId, chartPermi
 			if len(keyWordArr) > 1 {
 				if ikType == 2 {
 					keyWord = KeyWordArrSqlRegexp(keyWordArr)
+					condition += `	AND (art.label NOT LIKE  '%` + keyWordNoIk + `%' AND   art.activity_name NOT LIKE '%` + keyWordNoIk + `%' ) `
 				} else if ikType == 3 {
 					keyWord = KeyWordArrSqlRegexpAll(keyWordArr)
 				}
 			}
 		}
-
 		condition += ` AND (art.label   REGEXP '` + keyWord + `' OR art.activity_name  REGEXP '` + keyWord + `' ) `
 	} else {
 		if activeState != "" {

+ 2 - 0
services/activity_special.go

@@ -128,6 +128,8 @@ func GetActivityLabelSpecialList(user *models.WxUserItem, isPower int, chartPerm
 	}
 	//if len(specialList) < 8 {
 	//	conditionTrip += ` AND art.days = 0  ORDER BY art.last_updated_time DESC`
+
+	condition += ` AND art.days = 0  ORDER BY art.last_updated_time DESC`
 	specialListNotrip, e := models.GetActivityLabelSpecialListAll(condition, pars, 0, 20)
 	if e != nil {
 		err = e