Notice.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package com.goafanti.common.model;
  2. import java.util.Date;
  3. import org.apache.commons.lang3.time.DateFormatUtils;
  4. import com.fasterxml.jackson.annotation.JsonIgnore;
  5. import com.goafanti.common.constant.AFTConstants;
  6. import com.goafanti.common.enums.NoticeStatus;
  7. public class Notice {
  8. private String id;
  9. private String aid;
  10. /**
  11. * 通知类型
  12. */
  13. private Integer noticeType;
  14. /**
  15. * 通知内容
  16. */
  17. private String content;
  18. /**
  19. * 创建时间
  20. */
  21. private Date createTime;
  22. private Integer readed;
  23. public String getId() {
  24. return id;
  25. }
  26. public void setId(String id) {
  27. this.id = id;
  28. }
  29. public String getAid() {
  30. return aid;
  31. }
  32. public void setAid(String aid) {
  33. this.aid = aid;
  34. }
  35. public Integer getNoticeType() {
  36. return noticeType;
  37. }
  38. public void setNoticeType(Integer noticeType) {
  39. this.noticeType = noticeType;
  40. }
  41. public String getContent() {
  42. return content;
  43. }
  44. public void setContent(String content) {
  45. this.content = content;
  46. }
  47. public Date getCreateTime() {
  48. return createTime;
  49. }
  50. public void setCreateTime(Date createTime) {
  51. this.createTime = createTime;
  52. }
  53. @JsonIgnore
  54. public Integer getReaded() {
  55. return readed;
  56. }
  57. public void setReaded(Integer readed) {
  58. this.readed = readed;
  59. }
  60. public String getNoticeTypeName(){
  61. if (null == this.noticeType){
  62. return null;
  63. } else {
  64. if (NoticeStatus.PATENTINFO.getCode() == this.noticeType){
  65. return NoticeStatus.PATENTINFO.getDesc();
  66. }
  67. if (NoticeStatus.COGNIZANCE.getCode() == this.noticeType){
  68. return NoticeStatus.COGNIZANCE.getDesc();
  69. }
  70. if (NoticeStatus.COPYRIGHT.getCode() == this.noticeType){
  71. return NoticeStatus.COPYRIGHT.getDesc();
  72. }
  73. if (NoticeStatus.TECHPROJECT.getCode() == this.noticeType){
  74. return NoticeStatus.TECHPROJECT.getDesc();
  75. }
  76. return NoticeStatus.OTHER.getDesc();
  77. }
  78. }
  79. public void setNoticeTypeName(Integer noticeType){
  80. }
  81. public String getCreateTimeFormattedDate() {
  82. if (this.createTime == null) {
  83. return null;
  84. } else {
  85. return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
  86. }
  87. }
  88. public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
  89. }
  90. }