package com.yeshi.fanli.util.factory.msg;
|
|
import java.util.Date;
|
|
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;
|
|
public class MsgOtherDetailFactory {
|
|
/**
|
* 券相关信息的通知
|
*
|
* @param uid
|
* @param content
|
* @param type
|
* @param beiZhu
|
* @return
|
*/
|
public static MsgOtherDetail createCouponMsg(Long uid, 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);
|
return detail;
|
}
|
|
}
|