package com.goafanti.common.model; import java.util.Date; import org.apache.commons.lang3.time.DateFormatUtils; import com.fasterxml.jackson.annotation.JsonIgnore; import com.goafanti.common.constant.AFTConstants; import com.goafanti.common.enums.NoticeStatus; public class Notice { private String id; private String aid; /** * 通知类型 */ private Integer noticeType; /** * 通知内容 */ private String content; /** * 创建时间 */ private Date createTime; private Integer readed; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getAid() { return aid; } public void setAid(String aid) { this.aid = aid; } public Integer getNoticeType() { return noticeType; } public void setNoticeType(Integer noticeType) { this.noticeType = noticeType; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } @JsonIgnore public Integer getReaded() { return readed; } public void setReaded(Integer readed) { this.readed = readed; } public String getNoticeTypeName(){ if (null == this.noticeType){ return null; } else { if (NoticeStatus.PATENTINFO.getCode() == this.noticeType){ return NoticeStatus.PATENTINFO.getDesc(); } if (NoticeStatus.COGNIZANCE.getCode() == this.noticeType){ return NoticeStatus.COGNIZANCE.getDesc(); } if (NoticeStatus.COPYRIGHT.getCode() == this.noticeType){ return NoticeStatus.COPYRIGHT.getDesc(); } if (NoticeStatus.TECHPROJECT.getCode() == this.noticeType){ return NoticeStatus.TECHPROJECT.getDesc(); } return NoticeStatus.OTHER.getDesc(); } } public void setNoticeTypeName(Integer noticeType){ } public String getCreateTimeFormattedDate() { if (this.createTime == null) { return null; } else { return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD); } } public void setCreateTimeFormattedDate(String createTimeFormattedDate) { } }