admin
2019-02-27 d4d0c8326d031ff8a2d47d0305a021f3689b8e9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
    }
 
}