| | |
| | | import java.util.List;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.msg.MsgInviteContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | |
| | | return null;
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("恭喜你!团队增加直接粉丝:", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("",ClientTextStyleVO.COLOR_CONTENT, portrait));
|
| | | contentList.add(new ClientTextStyleVO("、" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("直接粉丝", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | contentList.add(new ClientTextStyleVO("&" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝信息", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝类别", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("直接粉丝", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("加入时间", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(TimeUtil.formatDate(time), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | |
| | | return null;
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("恭喜你!团队增加直接粉丝:", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("",ClientTextStyleVO.COLOR_CONTENT, portrait));
|
| | | contentList.add(new ClientTextStyleVO("、" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("间接粉丝", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | |
| | | contentList.add(new ClientTextStyleVO("&" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝信息", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝类别", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("间接粉丝", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("由直接粉丝", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO(inviteName,ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | |
| | | detail.setExtraInfo(new Gson().toJson(listMsg));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 领取信息激活邀请关系
|
| | | * |
| | | * @param threeSale
|
| | | * 粉丝升级
|
| | | * @param uid
|
| | | * @param rankName
|
| | | * @param nickName
|
| | | * @param item
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail receiveGift(Long uid, String beiZhu, MsgInviteContentDTO content) {
|
| | | if (content == null || uid == null)
|
| | | public static MsgInviteDetail fansUpgrade(Long uid, String rankName, String nickName, String item, Date time) {
|
| | | if (nickName == null || uid == null || item == null || time == null)
|
| | | return null;
|
| | |
|
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | if (StringUtil.isNullOrEmpty(beiZhu))
|
| | | detail.setBeiZhu("无");
|
| | | else
|
| | | detail.setBeiZhu(beiZhu);
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("恭喜你!你的直接粉丝:", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(nickName ,ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("已升级为", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(rankName, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("升级说明", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("升级时间", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(TimeUtil.formatDate(time), ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("升级方式", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(String.format("满足%s条件后完成的升级", item), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("如有疑问请联系人工客服", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | |
| | | MsgInviteDetail detail = new MsgInviteDetail();
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setDesc(new Gson().toJson(content));
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.receiveGift);
|
| | | detail.setMsgType(MsgTypeInviteTypeEnum.fansUpgrade);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setExtraInfo(new Gson().toJson(listMsg));
|
| | | return detail;
|
| | | }
|
| | | |
| | | }
|