浏览代码

Merge branch 'dev_v2.9.41_wh' of jianyu/ent_new into feature/v2.9.41

王浩 1 年之前
父节点
当前提交
a8a345b243
共有 1 个文件被更改,包括 26 次插入0 次删除
  1. 26 0
      entniche_new/src/service/subscribe/subscribe.go

+ 26 - 0
entniche_new/src/service/subscribe/subscribe.go

@@ -491,6 +491,24 @@ func (ac *Action) Subscribe_index() error {
 			} else {
 				subscribe["i_matchway"] = 1
 			}
+			//新关键词匹配
+			if entniche["i_matchmode"] != nil {
+				subscribe["i_matchmode"] = entniche["i_matchmode"]
+			} else {
+				subscribe["i_matchmode"] = []string{"title"}
+			}
+			//金额
+			if entniche["amount"] != nil {
+				subscribe["amount"] = entniche["i_matchmode"]
+			} else {
+				subscribe["amount"] = ""
+			}
+			//订阅开关
+			if entniche["i_switch"] != nil {
+				subscribe["switch"] = entniche["i_switch"]
+			} else {
+				subscribe["switch"] = 0
+			}
 		} //else {subscribe["area"] = nil subscribe["buyerclass"] = nil subscribe["items"] = nil subscribe["infotype"] = nil 	subscribe["ratemode"] = 1 subscribe["projectmatch"] = 0 }
 	}
 	//区域格式化
@@ -1501,6 +1519,9 @@ func (ac *Action) Update_pushset() {
 	matchway, _ := ac.GetInteger("matchway")
 	identity := ac.GetString("identity")
 	vSwitch := ac.GetString("vSwitch")
+	amount := ac.GetString("amount")
+	Iswitch, _ := ac.GetInteger("switch")
+	matchmode := ac.GetString("matchmode")
 	i_type := 0
 	if vSwitch == "m" || vSwitch == "v" {
 		i_type = 1
@@ -1517,6 +1538,11 @@ func (ac *Action) Update_pushset() {
 	if matchway > 0 {
 		update[`o_entniche.i_matchway`] = matchway
 	}
+	if matchmode != "" {
+		update[`o_entniche.i_matchmode`] = strings.Split(matchmode, ",")
+	}
+	update[`o_entniche.i_switch`] = Iswitch
+	update[`o_entniche.amount`] = amount
 	query := map[string]interface{}{}
 	switch identity {
 	case "ent":