From 3ce9e928e082ff8abf697dba560cbfbb412e89f8 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 11 十一月 2019 15:45:02 +0800 Subject: [PATCH] 商城后台编辑 --- fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 50 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 b5264e2..44c4f3f 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 @@ -683,7 +683,7 @@ return null; contentList = new ArrayList<>(); - contentList.add(new ClientTextStyleVO(MsgTypeMoneyTypeEnum.redPackExchangePass.getDesc() + "", COLOR_CONTENT)); + contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT)); items.add(new CommonMsgItemVO(new ClientTextStyleVO("绫诲埆", COLOR_TITLE), contentList)); contentList = new ArrayList<>(); @@ -719,7 +719,7 @@ return null; contentList = new ArrayList<>(); - contentList.add(new ClientTextStyleVO(MsgTypeMoneyTypeEnum.redPackExchangePass.getDesc() + "", COLOR_CONTENT)); + contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT)); items.add(new CommonMsgItemVO(new ClientTextStyleVO("绫诲埆", COLOR_TITLE), contentList)); contentList = new ArrayList<>(); @@ -763,7 +763,7 @@ contentList = new ArrayList<>(); contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT)); - items.add(new CommonMsgItemVO(new ClientTextStyleVO("閲戦", COLOR_TITLE), contentList)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("閲� 棰�", COLOR_TITLE), contentList)); contentList = new ArrayList<>(); contentList.add(new ClientTextStyleVO(dto.getBalance() + "", COLOR_HIGHLIGHT_CONTENT)); @@ -1297,6 +1297,53 @@ userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime()); userMsgVO.setContentItems(items); return userMsgVO; + } else if (msg.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) { + if (StringUtil.isNullOrEmpty(msg.getContent())) + return null; + + MsgOtherRewardIntegralDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherRewardIntegralDTO.class); + if (dto == null) + return null; + + icon = "http://img.flqapp.com/resource/msg/icon_msg_other_system_give.png"; + + List<ClientTextStyleVO> contentList = new ArrayList<>(); + + if (!StringUtil.isNullOrEmpty(dto.getExplain())) { + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(dto.getExplain() + "", COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("鍘熷洜", COLOR_TITLE), contentList)); + } + + if (dto.getTotal() != null) { + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(dto.getTotal(), COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("鍙垯绠楅", COLOR_TITLE), contentList)); + } + + if (!StringUtil.isNullOrEmpty(dto.getNum())) { + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(dto.getNum() + "", 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)); + } + + contentList = new ArrayList<>(); + contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(), + COLOR_CONTENT)); + items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶囨敞", COLOR_TITLE), contentList)); + + UserMsgVO userMsgVO = new UserMsgVO(); + userMsgVO.setIcon(icon); + userMsgVO.setTitle(dto.getTitle()); + userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime()); + userMsgVO.setContentItems(items); + return userMsgVO; } return new UserMsgVO(icon, msg.getType().getDesc(), -- Gitblit v1.8.0