Browse Source

Merge branch 'release' into dev2.9.1

lianbingjie 5 years ago
parent
commit
630f21a542
3 changed files with 20 additions and 2 deletions
  1. 0 1
      README.md
  2. 1 1
      common/src/qfw/util/jy/entnichepush.go
  3. 19 0
      core/src/qfw/manage/message.go

+ 0 - 1
README.md

@@ -13,4 +13,3 @@ pkg目录,已经在版本控制中排除,不会被提交。
 业务代码放在bsw目录中,按前后台\模块划分
 业务代码放在bsw目录中,按前后台\模块划分
 系统配置文件统一放在config.json中。
 系统配置文件统一放在config.json中。
 
 
-

+ 1 - 1
common/src/qfw/util/jy/entnichepush.go

@@ -245,7 +245,7 @@ func (e *entnichePush) Visit(PushMysql *mysql.Mysql, entId, userId, id int) {
 	if id <= 0 {
 	if id <= 0 {
 		return
 		return
 	}
 	}
-	PushMysql.UpdateOrDeleteBySql("update pushsubscribe set isvisit=1 where userid=? and id=?", userId, id)
+	PushMysql.UpdateOrDeleteBySql("update pushentniche set isvisit=1 where userid=? and id=?", userId, id)
 	todaySubPush, err := e.GetTodayCache(entId, userId)
 	todaySubPush, err := e.GetTodayCache(entId, userId)
 	if err == nil && todaySubPush != nil {
 	if err == nil && todaySubPush != nil {
 		for _, v := range todaySubPush.Datas {
 		for _, v := range todaySubPush.Datas {

+ 19 - 0
core/src/qfw/manage/message.go

@@ -77,6 +77,25 @@ func (m *Message) Content(id string) error {
 		r := FindById("message_app", id, nil)
 		r := FindById("message_app", id, nil)
 		if nil != r {
 		if nil != r {
 			(*r)["_id"] = strings.Split(fmt.Sprintf("%s", (*r)["_id"]), `"`)[1]
 			(*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"]
 			data_3 := (*r)["l_submitdate"]
 			(*r)["l_submitdate"] = util.FormatDateWithObj(&data_3, util.Date_Full_Layout)
 			(*r)["l_submitdate"] = util.FormatDateWithObj(&data_3, util.Date_Full_Layout)
 			s_url := util.ObjToString((*r)["s_url"])
 			s_url := util.ObjToString((*r)["s_url"])