|
@@ -1498,10 +1498,10 @@ func (s *subscribePush) Keys(spqp *KeyParam) (result []*bxsubscribe.KeyItems) {
|
|
|
a_key, _ := o_jy["a_key"].([]interface{})
|
|
|
if len(a_key) > 0 {
|
|
|
for _, v := range a_key {
|
|
|
- if keyData["其他"] != nil {
|
|
|
- keyData["其他"] = append(keyData["其他"], v)
|
|
|
+ if keyData["未分类"] != nil {
|
|
|
+ keyData["未分类"] = append(keyData["未分类"], v)
|
|
|
} else {
|
|
|
- keyData["其他"] = []interface{}{v}
|
|
|
+ keyData["未分类"] = []interface{}{v}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1510,17 +1510,17 @@ func (s *subscribePush) Keys(spqp *KeyParam) (result []*bxsubscribe.KeyItems) {
|
|
|
//1、mysql entniche_user_rule表中获取自己的分发规则id
|
|
|
data := IC.MainMysql.SelectBySql(`select rule_id from entniche_user_rule where user_id =? `, spqp.EntUserId)
|
|
|
if data == nil || len(*data) == 0 {
|
|
|
- return MapToarr(keyData, s.ModuleFlag)
|
|
|
+ return MapToarr(keyData)
|
|
|
}
|
|
|
ruleId := common.ObjToString((*data)[0]["rule_id"])
|
|
|
//3、entniche_distribute表,查询条件:{_id:ObjectId(1结果中的分发规则id),i_status:0},取 o_entniche.a_items,这个查到的是分类名称,然后到上面1的结果中获取这个分类下的词
|
|
|
res, _ := IC.Mgo.FindById("entniche_distribute", ruleId, nil)
|
|
|
if res == nil || len(*res) == 0 {
|
|
|
- return MapToarr(keyData, s.ModuleFlag)
|
|
|
+ return MapToarr(keyData)
|
|
|
}
|
|
|
entItem := (*res)["a_items"].([]interface{})
|
|
|
if (*res)["a_items"] == nil {
|
|
|
- return MapToarr(keyData, s.ModuleFlag)
|
|
|
+ return MapToarr(keyData)
|
|
|
}
|
|
|
|
|
|
//2、entniche_rule表, 企业订阅关键词查询条件: {i_entid:123,i_deptid:0},取 o_entniche.a_items
|
|
@@ -1578,7 +1578,7 @@ func (s *subscribePush) Keys(spqp *KeyParam) (result []*bxsubscribe.KeyItems) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return MapToarr(keyData, s.ModuleFlag)
|
|
|
+ return MapToarr(keyData)
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1595,7 +1595,7 @@ func KeyHandle(a_items map[string]interface{}) []interface{} {
|
|
|
}
|
|
|
return keyArr
|
|
|
}
|
|
|
-func MapToarr(data map[string][]interface{}, userType string) []*bxsubscribe.KeyItems {
|
|
|
+func MapToarr(data map[string][]interface{}) []*bxsubscribe.KeyItems {
|
|
|
result := []*bxsubscribe.KeyItems{}
|
|
|
for k, v := range data {
|
|
|
keyArr := []*bxsubscribe.Key{}
|
|
@@ -1615,9 +1615,6 @@ func MapToarr(data map[string][]interface{}, userType string) []*bxsubscribe.Key
|
|
|
}
|
|
|
keyArr = append(keyArr, keys)
|
|
|
}
|
|
|
- if userType == SubFreeFlag {
|
|
|
- k = ""
|
|
|
- }
|
|
|
result = append(result, &bxsubscribe.KeyItems{
|
|
|
AKey: keyArr,
|
|
|
SItem: k,
|