From bd331a582851cffcce54316e677e23760de4f384 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 24 六月 2019 11:36:49 +0800 Subject: [PATCH] 冲突文件 --- fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 41 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java index 9fb13a4..4e80078 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java @@ -7,6 +7,7 @@ import com.google.gson.Gson; import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO; +import com.yeshi.fanli.dto.msg.MsgOtherTaoLiJinContentDTO; import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail; import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail; import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail; @@ -477,6 +478,9 @@ */ public static UserMsgVO create(MsgOtherDetail msg) { List<CommonMsgItemVO> items = new ArrayList<>(); + + String icon = null; + if (msg.getType() == MsgTypeOtherTypeEnum.couponMianDan || msg.getType() == MsgTypeOtherTypeEnum.couponWelfareMianDan || msg.getType() == MsgTypeOtherTypeEnum.couponReward) { @@ -486,7 +490,9 @@ MsgOtherCouponContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherCouponContentDTO.class); if (dto == null) return null; - + + icon = "http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png"; + List<ClientTextStyleVO> contentList = new ArrayList<>(); contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT)); items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐘舵��", COLOR_TITLE), contentList)); @@ -547,10 +553,42 @@ contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(), COLOR_CONTENT)); items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", COLOR_TITLE), contentList)); + + } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJin) { + if (StringUtil.isNullOrEmpty(msg.getContent())) + return null; + + MsgOtherTaoLiJinContentDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherTaoLiJinContentDTO.class); + if (dto == null) + return null; + + icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png"; + + List<ClientTextStyleVO> contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(dto.getState(), COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐘舵��", COLOR_TITLE), contentList)); + + if (!StringUtil.isNullOrEmpty(dto.getSource())) { + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(dto.getSource() + "", COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("鏉ユ簮", COLOR_TITLE), contentList)); + } + + if (dto.getMoney() != null) { + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO("楼" + filterMoney(dto.getMoney().setScale(2)), + COLOR_HIGHLIGHT_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("闈㈤", COLOR_TITLE), contentList)); + } + + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(), + COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", COLOR_TITLE), contentList)); + } - return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_other_coupon.png", msg.getType().getDesc(), - msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items); + return new UserMsgVO(icon, msg.getType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items); } } -- Gitblit v1.8.0