From c22963a2ee796e59094524cadc5a78c450ed98f8 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 01 八月 2019 17:54:29 +0800 Subject: [PATCH] 动态分享无券 + 下架 不能分享 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java index dbb57f0..6accc2b 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java @@ -699,11 +699,11 @@ acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2); boolean read = false; if (state != null && state.getReadTime() != null - && list.get(0).getCreateTime().getTime() < state.getReadTime().getTime()) + && list.get(0).getPushTime().getTime() < state.getReadTime().getTime()) read = true; commonMsgList.add(new UserCommonMsgVO("http://img.flqapp.com/resource/msg/icon_recommend.png", "鎺ㄨ崘璁板綍", - list.get(0).getCreateTime(), UserCommonMsgVO.TYPE_RECOMMEND, list.get(0).getContent(), read, + list.get(0).getPushTime(), UserCommonMsgVO.TYPE_RECOMMEND, list.get(0).getContent(), read, jumpDetailV2Service.getByTypeCache("recommend_list"), null, 0)); } } @@ -834,6 +834,29 @@ } } + /** + * 鎻愰啋澶у浘 + */ + MsgCommonDTO notify = msgConfigService.getNotifyMsg(); + + if (notify != null && notify.getShow() == true) { + boolean read = false; + MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType( + UserCommonMsgVO.TYPE_NOTIFY, acceptData.getDevice(), + acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2); + if (state != null && state.getReadTime() != null + && zhuShouMsg.getUpdateTime().getTime() < state.getReadTime().getTime()) + read = true; + if (notify.getJumpDetail() == null) + read = true; + // 鏌ヨ鏄惁宸茶 + UserCommonMsgVO vo = new UserCommonMsgVO(notify.getIcon(), notify.getTitle(), notify.getUpdateTime(), + UserCommonMsgVO.TYPE_NOTIFY, notify.getContent(), read, notify.getJumpDetail(), notify.getParams(), + 0); + vo.setPicture(notify.getPicture()); + root.put("notifyMsg", builder.create().toJson(vo)); + } + root.put("list", builder.create().toJson(listCenter)); root.put("commonList", builder.create().toJson(commonMsgList)); root.put("count", listCenter.size()); -- Gitblit v1.8.0