| | |
| | | |
| | | public static UserMsgVO create(UserMsg msg) { |
| | | UserMsgVO vo = new UserMsgVO(); |
| | | vo.setIcon(""); |
| | | vo.setId(msg.getId()); |
| | | vo.setIcon(msg.getMsgType().getIcon()); |
| | | vo.setName(msg.getMsgType().getName()); |
| | | vo.setTime(msg.getCreateTime()); |
| | | if (msg.getMsgType() == UserMsg.UserMsgType.lucky) { |
| | |
| | | voList.add(new UserMsgContentVO("领取状态", luckyMsgContent.getReceiveState())); |
| | | voList.add(new UserMsgContentVO("奖品权益", luckyMsgContent.getOutDateAwardState())); |
| | | } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.assistAndJoin) { |
| | | voList.add(new UserMsgContentVO("助力状态", "助力好友<img src='" + luckyMsgContent.getAssistUser().getPortrait() + "'>成功参与了抽奖")); |
| | | voList.add(new UserMsgContentVO("助力状态", "<div style='display:flex; align-items: center;'>助力好友<img style='width: 48rpx;height: 48rpx;border-radius: 50%;' src='" + luckyMsgContent.getAssistUser().getPortrait() + "' />成功参与了抽奖</div>")); |
| | | voList.add(new UserMsgContentVO("幸运券数", String.format("+%s张", luckyMsgContent.getWeight()))); |
| | | } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.assist) { |
| | | voList.add(new UserMsgContentVO("助力状态", "好友<img src='" + luckyMsgContent.getAssistUser().getPortrait() + "'>助力成功")); |
| | | voList.add(new UserMsgContentVO("助力状态", "<div style='display:flex; align-items: center;'>好友<img style='width: 48rpx;height: 48rpx;border-radius: 50%;' src='" + luckyMsgContent.getAssistUser().getPortrait() + "' />助力成功</div>")); |
| | | voList.add(new UserMsgContentVO("幸运券数", String.format("+%s张", luckyMsgContent.getWeight()))); |
| | | } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.openFail) { |
| | | voList.add(new UserMsgContentVO("开奖状态", luckyMsgContent.getOpenState())); |