|
@@ -45,6 +45,7 @@ func (ac *Action) Subscribe_index() error {
|
|
}
|
|
}
|
|
var o_entniche *map[string]interface{}
|
|
var o_entniche *map[string]interface{}
|
|
model := entInfo.Ent.Model //1-统一订阅 2-个人订阅
|
|
model := entInfo.Ent.Model //1-统一订阅 2-个人订阅
|
|
|
|
+ log.Println("model:", model)
|
|
if model == 1 {
|
|
if model == 1 {
|
|
o_entniche, _ = util.MQFW.FindOne("entniche_rule", map[string]interface{}{
|
|
o_entniche, _ = util.MQFW.FindOne("entniche_rule", map[string]interface{}{
|
|
"i_deptid": entInfo.Dept.Id,
|
|
"i_deptid": entInfo.Dept.Id,
|
|
@@ -260,7 +261,7 @@ func (ac *Action) Get_infotype() {
|
|
delete(*res, "_id")
|
|
delete(*res, "_id")
|
|
//转换
|
|
//转换
|
|
o_entniche := qutil.ObjToMap((*res)["o_entniche"])
|
|
o_entniche := qutil.ObjToMap((*res)["o_entniche"])
|
|
- if len(*o_entniche) != 0 {
|
|
|
|
|
|
+ if (*o_entniche)["a_infotype"] != nil {
|
|
data = qutil.ObjArrToStringArr((*o_entniche)["a_infotype"].([]interface{}))
|
|
data = qutil.ObjArrToStringArr((*o_entniche)["a_infotype"].([]interface{}))
|
|
} else {
|
|
} else {
|
|
data = nil
|
|
data = nil
|
|
@@ -360,15 +361,15 @@ func (ac *Action) Get_key() {
|
|
status = 1
|
|
status = 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- log.Println(o_entniche)
|
|
|
|
- if len(*o_entniche) != 0 {
|
|
|
|
|
|
+ log.Println("----", o_entniche)
|
|
|
|
+ if (*o_entniche)["a_items"] != nil {
|
|
//data = qutil.ObjArrToStringArr((*o_entniche)["a_items"].([]interface{}))
|
|
//data = qutil.ObjArrToStringArr((*o_entniche)["a_items"].([]interface{}))
|
|
data = qutil.ObjArrToMapArr((*o_entniche)["a_items"].([]interface{}))
|
|
data = qutil.ObjArrToMapArr((*o_entniche)["a_items"].([]interface{}))
|
|
} else {
|
|
} else {
|
|
data = nil
|
|
data = nil
|
|
}
|
|
}
|
|
|
|
|
|
- log.Println("查看key:", data)
|
|
|
|
|
|
+ log.Println("status", status, "查看key:", data)
|
|
ac.ServeJson(Result{Data: M{"data": data, "status": status}})
|
|
ac.ServeJson(Result{Data: M{"data": data, "status": status}})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -517,29 +518,30 @@ func (ac *Action) Get_fastimport() {
|
|
ac.ServeJson(Result{Data: M{"status": 0}})
|
|
ac.ServeJson(Result{Data: M{"status": 0}})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if o_entniche["a_items"] != nil {
|
|
|
|
+ a_items_ent = qutil.ObjArrToMapArr(o_entniche["a_items"].([]interface{}))
|
|
|
|
+ for k, v := range a_items_ent {
|
|
|
|
+ s_item := qutil.ObjToString(v["s_item"])
|
|
|
|
+ a[s_item] = k + 1
|
|
|
|
+ a_key := qutil.ObjArrToMapArr(v["a_key"].([]interface{}))
|
|
|
|
+ for _, n := range a_key {
|
|
|
|
+ notkey := []string{}
|
|
|
|
+ appendkey := []string{}
|
|
|
|
+ if n["notkey"] != nil {
|
|
|
|
+ notkey = qutil.ObjArrToStringArr(n["notkey"].([]interface{}))
|
|
|
|
+ }
|
|
|
|
+ key := qutil.ObjArrToStringArr(n["key"].([]interface{}))
|
|
|
|
+ if n["appendkey"] != nil {
|
|
|
|
+ appendkey = qutil.ObjArrToStringArr(n["appendkey"].([]interface{}))
|
|
|
|
+ }
|
|
|
|
|
|
- a_items_ent = qutil.ObjArrToMapArr(o_entniche["a_items"].([]interface{}))
|
|
|
|
- for k, v := range a_items_ent {
|
|
|
|
- s_item := qutil.ObjToString(v["s_item"])
|
|
|
|
- a[s_item] = k + 1
|
|
|
|
- a_key := qutil.ObjArrToMapArr(v["a_key"].([]interface{}))
|
|
|
|
- for _, n := range a_key {
|
|
|
|
- notkey := []string{}
|
|
|
|
- appendkey := []string{}
|
|
|
|
- if n["notkey"] != nil {
|
|
|
|
- notkey = qutil.ObjArrToStringArr(n["notkey"].([]interface{}))
|
|
|
|
- }
|
|
|
|
- key := qutil.ObjArrToStringArr(n["key"].([]interface{}))
|
|
|
|
- if n["appendkey"] != nil {
|
|
|
|
- appendkey = qutil.ObjArrToStringArr(n["appendkey"].([]interface{}))
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- key_str := strings.Join(key, "")
|
|
|
|
- notkey_str := strings.Join(notkey, "")
|
|
|
|
- appendkey_str := strings.Join(appendkey, "")
|
|
|
|
- keys := key_str + notkey_str + appendkey_str
|
|
|
|
|
|
+ key_str := strings.Join(key, "")
|
|
|
|
+ notkey_str := strings.Join(notkey, "")
|
|
|
|
+ appendkey_str := strings.Join(appendkey, "")
|
|
|
|
+ keys := key_str + notkey_str + appendkey_str
|
|
|
|
|
|
- b[keys] = true
|
|
|
|
|
|
+ b[keys] = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//vip设置关键词
|
|
//vip设置关键词
|