|
@@ -77,6 +77,25 @@ func (m *Message) Content(id string) error {
|
|
|
r := FindById("message_app", id, nil)
|
|
|
if nil != r {
|
|
|
(*r)["_id"] = strings.Split(fmt.Sprintf("%s", (*r)["_id"]), `"`)[1]
|
|
|
+ //此条消息已读的数量
|
|
|
+ r_count_0 := Count("jyapp_notice", map[string]interface{}{
|
|
|
+ "s_type": "message",
|
|
|
+ "i_unread": 0,
|
|
|
+ "s_id": (*r)["_id"],
|
|
|
+ })
|
|
|
+ //此条消息全部推送的数量
|
|
|
+ r_count := Count("jyapp_notice", map[string]interface{}{
|
|
|
+ "s_type": "message",
|
|
|
+ "s_id": (*r)["_id"],
|
|
|
+ })
|
|
|
+ //如果此条消息送达量小于打开量;是错误的,重新赋值展示
|
|
|
+ if (*r)["i_delivery"].(int) < r_count_0 {
|
|
|
+ (*r)["i_delivery"] = r_count_0
|
|
|
+ }
|
|
|
+ (*r)["i_click"] = r_count_0
|
|
|
+ if r_count > 0 {
|
|
|
+ (*r)["i_total"] = r_count
|
|
|
+ }
|
|
|
data_3 := (*r)["l_submitdate"]
|
|
|
(*r)["l_submitdate"] = util.FormatDateWithObj(&data_3, util.Date_Full_Layout)
|
|
|
s_url := util.ObjToString((*r)["s_url"])
|