| | |
| | | import com.yeshi.fanli.dto.msg.MsgOtherExchangeContentDTO;
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherGiveContentDTO;
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherRewardIntegralDTO;
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherTaoLiJinContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
| | |
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | if (msg.getType() == MsgTypeOrderTypeEnum.found) {
|
| | |
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | |
|
| | |
|
| | | String orderId = msg.getOrderId();
|
| | | MsgTypeOrderTypeEnum type = msg.getType();
|
| | |
| | |
|
| | | contentList = new ArrayList<>();
|
| | |
|
| | | |
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(dto.getCode())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getCode() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请码", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(dto.getInviter())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getInviter() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请人", COLOR_TITLE), contentList));
|
| | | }
|
| | | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getMode())) {
|
| | | contentList = new ArrayList<>();
|
| | |
| | | icon = "http://img.flqapp.com/resource/msg/icon_msg_other_tlj.png";
|
| | | }
|
| | |
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getGiveType(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送类别", COLOR_TITLE), contentList));
|
| | |
| | | contentList.add(new ClientTextStyleVO(dto.getGiveTime() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠送时间", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getReceiveTime())) {
|
| | | contentList = new ArrayList<>();
|
| | |
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | } else if (msg.getType() == MsgTypeOtherTypeEnum.systemGive) {
|
| | | if (StringUtil.isNullOrEmpty(msg.getContent()))
|
| | | return null;
|
| | |
|
| | | MsgOtherSystemGiveDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherSystemGiveDTO.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.getName())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getName() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("赠品", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (dto.getCount() != null) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getCount() + "张", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("数量", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getReason())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getOrderId())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(
|
| | | "[" + Constant.getSourceName(dto.getOrderType()) + "]" + dto.getOrderId() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getDesc())) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getDesc(), 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(msg.getType().getDesc());
|
| | | userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
|
| | | userMsgVO.setContentItems(items);
|
| | | return userMsgVO;
|
| | | }
|
| | |
|
| | | return new UserMsgVO(icon, msg.getType().getDesc(),
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|