|
@@ -157,31 +157,31 @@ func (r *Report) Detail() {
|
|
|
result["subscribe"] = subscribe
|
|
|
//关注项目
|
|
|
res, _ := util.MQFW.Find("jy_pushproject", map[string]interface{}{
|
|
|
- "date": map[string]interface{}{
|
|
|
+ "l_date": map[string]interface{}{
|
|
|
"$gte": start,
|
|
|
"$lt": end + 86400,
|
|
|
},
|
|
|
- "userid": userId,
|
|
|
- }, nil, `{"pcode":1,"pname":1,"info":1}`, false, -1, 100)
|
|
|
+ "s_userid": userId,
|
|
|
+ }, nil, `{"s_projectcode":1,"s_projectname":1,"a_relationinfo":1}`, false, -1, 100)
|
|
|
follow_project := *res
|
|
|
if follow_project != nil {
|
|
|
indexMap := map[string]int{}
|
|
|
projects := []map[string]interface{}{}
|
|
|
for _, v := range follow_project {
|
|
|
- projectname := qutil.ObjToString(v["pname"])
|
|
|
+ projectname := qutil.ObjToString(v["s_projectname"])
|
|
|
if projectname == "" {
|
|
|
- projectname = qutil.ObjToString(v["pcode"])
|
|
|
+ projectname = qutil.ObjToString(v["s_projectcode"])
|
|
|
}
|
|
|
index, ok := indexMap[projectname]
|
|
|
//合并
|
|
|
if ok {
|
|
|
infos, _ := projects[index]["infos"].([]map[string]interface{})
|
|
|
- infos = append(infos, formatInfo(v["info"])...)
|
|
|
+ infos = append(infos, formatInfo(v["a_relationinfo"])...)
|
|
|
projects[index]["infos"] = infos
|
|
|
} else {
|
|
|
projects = append(projects, map[string]interface{}{
|
|
|
"projectname": projectname,
|
|
|
- "infos": formatInfo(v["info"]),
|
|
|
+ "infos": formatInfo(v["a_relationinfo"]),
|
|
|
})
|
|
|
indexMap[projectname] = len(projects) - 1
|
|
|
}
|
|
@@ -190,28 +190,28 @@ func (r *Report) Detail() {
|
|
|
}
|
|
|
//关注企业
|
|
|
res_ent, _ := util.MQFW.Find("jy_pushent", map[string]interface{}{
|
|
|
- "date": map[string]interface{}{
|
|
|
+ "l_date": map[string]interface{}{
|
|
|
"$gte": start,
|
|
|
"$lt": end + 86400,
|
|
|
},
|
|
|
- "userid": userId,
|
|
|
- }, nil, `{"entname":1,"info":1}`, false, -1, 100)
|
|
|
+ "s_userid": userId,
|
|
|
+ }, nil, `{"s_entname":1,"a_relationinfo":1}`, false, -1, 100)
|
|
|
follow_ent := *res_ent
|
|
|
if follow_ent != nil {
|
|
|
indexMap := map[string]int{}
|
|
|
ents := []map[string]interface{}{}
|
|
|
for _, v := range follow_ent {
|
|
|
- entname := qutil.ObjToString(v["entname"])
|
|
|
+ entname := qutil.ObjToString(v["s_entname"])
|
|
|
index, ok := indexMap[entname]
|
|
|
//合并
|
|
|
if ok {
|
|
|
infos, _ := ents[index]["infos"].([]map[string]interface{})
|
|
|
- infos = append(infos, formatInfo(v["info"])...)
|
|
|
+ infos = append(infos, formatInfo(v["a_relationinfo"])...)
|
|
|
ents[index]["infos"] = infos
|
|
|
} else {
|
|
|
ents = append(ents, map[string]interface{}{
|
|
|
"entname": entname,
|
|
|
- "infos": formatInfo(v["info"]),
|
|
|
+ "infos": formatInfo(v["a_relationinfo"]),
|
|
|
})
|
|
|
indexMap[entname] = len(ents) - 1
|
|
|
}
|