| | |
| | | import java.util.List;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
|
| | |
|
| | | public class MsgOtherDetailFactory {
|
| | |
|
| | | /**
|
| | | * 券相关信息的通知
|
| | | * |
| | | * @param uid
|
| | | * @param content
|
| | | * @param type
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOtherDetail createCouponMsg(Long uid, Long userCouponId, MsgOtherCouponContentDTO content,
|
| | | MsgTypeOtherTypeEnum type, String beiZhu) {
|
| | | if (uid == null)
|
| | | return null;
|
| | | MsgOtherDetail detail = new MsgOtherDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCoupnContent(content);
|
| | | detail.setType(type);
|
| | | detail.setSourceId(userCouponId);
|
| | | return detail;
|
| | | }
|
| | | |
| | | /**
|
| | | * 券相关信息的通知
|
| | | * |
| | | * @param uid
|
| | | * @param content
|
| | | * @param type
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOtherDetail createTaoLiJinMsg(Long uid, Long userCouponId, MsgOtherCouponContentDTO content,
|
| | | MsgTypeOtherTypeEnum type, String beiZhu) {
|
| | | if (uid == null)
|
| | | return null;
|
| | | MsgOtherDetail detail = new MsgOtherDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setCoupnContent(content);
|
| | | detail.setType(type);
|
| | | detail.setSourceId(userCouponId);
|
| | | return detail;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO(TimeUtil.formatDateDot(startTime) + "-" + TimeUtil.formatDateDot(endTime) + "-于", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO(days +"" ,ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("天过期", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("天后过期", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("有效期", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
| | |
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("使用范围", ClientTextStyleVO.COLOR_TITLE),
|
| | |
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO(TimeUtil.formatDateDot(startTime) + "-" + TimeUtil.formatDateDot(endTime) + "-于", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO(days +"" ,ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("天过期", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("天后过期", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("有效期", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
| | | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("使用范围", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("在\"我的-订单中\",可使5天内产生的返利订单再返", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO("奖励券可在【\"我的-福利中心\"】赠送他人", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | }
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("奖励券也可在【\"我的-福利中心\"】赠送他人", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO("无", ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | MsgOtherDetail detail = new MsgOtherDetail();
|
| | | detail.setCreateTime(new Date());
|