|
@@ -51,7 +51,7 @@ func GetCustomerData() {
|
|
|
appId := qu.ObjToString(c["s_appid"]) //appid
|
|
|
extends := qu.ObjToString(c["s_extends"]) //扩展信息
|
|
|
pushModel := qu.IntAll(c["i_pushmodel"]) //推送模式
|
|
|
-
|
|
|
+ log.Println("当前客户 ", customer)
|
|
|
cus := &Customer{}
|
|
|
cus.SaveDataMap = map[string]map[string]interface{}{}
|
|
|
cus.SaveDataArr = []map[string]interface{}{}
|
|
@@ -556,27 +556,17 @@ func (d *Department) GetSearchRules(cid, stype string, idRange bson.M) {
|
|
|
//获取关键词和附加词
|
|
|
if o_rules, ok := sr["o_rules"].(primitive.A); ok && len(o_rules) > 0 {
|
|
|
SR.GetKeyAddWord(o_rules)
|
|
|
- }
|
|
|
- //获取全局清理词
|
|
|
- SR.GetClearWord(clearKey, clearKeyMatch)
|
|
|
- d.Rules = append(d.Rules, SR)
|
|
|
- //
|
|
|
- if orules1, ok := sr["o_rules"].([]interface{}); ok {
|
|
|
- for _, v := range orules1 {
|
|
|
+ for _, v := range o_rules {
|
|
|
orule, _ := v.(map[string]interface{})
|
|
|
SR.Maths = append(SR.Maths, map[string]string{
|
|
|
"s_matchkey": qu.ObjToString(orule["s_matchkey"]),
|
|
|
"s_keymatch": qu.ObjToString(orule["s_keymatch"]),
|
|
|
})
|
|
|
}
|
|
|
- } else if orules2, ok := sr["o_rules"].([]map[string]interface{}); ok {
|
|
|
- for _, v := range orules2 {
|
|
|
- SR.Maths = append(SR.Maths, map[string]string{
|
|
|
- "s_matchkey": qu.ObjToString(v["s_matchkey"]),
|
|
|
- "s_keymatch": qu.ObjToString(v["s_keymatch"]),
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
+ //获取全局清理词
|
|
|
+ SR.GetClearWord(clearKey, clearKeyMatch)
|
|
|
+ d.Rules = append(d.Rules, SR)
|
|
|
}
|
|
|
}
|
|
|
}
|