|
@@ -871,19 +871,9 @@ func (m *Follow) AllNotice() error {
|
|
|
}
|
|
|
func (m *Follow) Notice(id, followId string) error {
|
|
|
defer util.Catch()
|
|
|
- //userid := util.ObjToString(m.GetSession("userId"))
|
|
|
- var query map[string]interface{}
|
|
|
- if len(id) == 19 {
|
|
|
- query = map[string]interface{}{
|
|
|
- "l_date": util.Int64All(id) / 1000000000,
|
|
|
- //"s_userid": userid,
|
|
|
- "s_followid": followId,
|
|
|
- }
|
|
|
- } else {
|
|
|
- query = map[string]interface{}{
|
|
|
- "_id": StringTOBsonId(id),
|
|
|
- //"s_userid": userid,
|
|
|
- }
|
|
|
+ query := map[string]interface{}{
|
|
|
+ "_id": StringTOBsonId(id),
|
|
|
+ "s_userid": util.ObjToString(m.GetSession("userId")),
|
|
|
}
|
|
|
data, ok := public.MQFW.FindOneByField("jy_pushproject", query, `{"s_followid":-1,"s_title":1,"s_projectcode":1,"s_projectname":1,"a_relationinfo":1,"a_visited":1}`)
|
|
|
if ok && data != nil && len(*data) > 0 {
|
|
@@ -907,7 +897,7 @@ func (m *Follow) Notice(id, followId string) error {
|
|
|
go public.MQFW.UpdateById("jy_pushproject", id, map[string]interface{}{
|
|
|
"$addToSet": map[string]interface{}{"a_visited": firstMap["s_id"]},
|
|
|
})
|
|
|
- return m.Redirect("/article/content/" + util.ObjToString(firstMap["s_id"]) + ".html")
|
|
|
+ return m.Redirect("/article/content/" + util.ObjToString(firstMap["s_id"]) + ".html?advertcode=" + m.GetString("advertcode"))
|
|
|
}
|
|
|
(*data)["a_relationinfo"] = relationinfo
|
|
|
}
|