NewsSummary.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. package com.goafanti.news.bo;
  2. import java.util.Date;
  3. import org.apache.commons.lang3.time.DateFormatUtils;
  4. import com.fasterxml.jackson.annotation.JsonFormat;
  5. import com.fasterxml.jackson.annotation.JsonFormat.Shape;
  6. import com.goafanti.common.constant.AFTConstants;
  7. public class NewsSummary {
  8. /**
  9. * 主键
  10. */
  11. private Long id;
  12. /**
  13. * 创建时间
  14. */
  15. private Date createTime;
  16. /**
  17. * 标题
  18. */
  19. private String title;
  20. /**
  21. * 题图url
  22. */
  23. private String titleImg;
  24. /**
  25. * 类型
  26. */
  27. private Integer type;
  28. /**
  29. * 是否放在首页
  30. */
  31. private Integer hot;
  32. /**
  33. * 简介
  34. */
  35. private String summary;
  36. /**
  37. * 来源
  38. */
  39. private String source;
  40. /**
  41. * 审核状态
  42. */
  43. private Integer auditStatus;
  44. /**
  45. * 是否发布
  46. */
  47. private Integer releaseStatus;
  48. @JsonFormat(shape = Shape.STRING)
  49. public Long getId() {
  50. return id;
  51. }
  52. public void setId(Long id) {
  53. this.id = id;
  54. }
  55. public Integer getAuditStatus() {
  56. return auditStatus;
  57. }
  58. public void setAuditStatus(Integer auditStatus) {
  59. this.auditStatus = auditStatus;
  60. }
  61. public Integer getReleaseStatus() {
  62. return releaseStatus;
  63. }
  64. public void setReleaseStatus(Integer releaseStatus) {
  65. this.releaseStatus = releaseStatus;
  66. }
  67. public Date getCreateTime() {
  68. return createTime;
  69. }
  70. public void setCreateTime(Date createTime) {
  71. this.createTime = createTime;
  72. }
  73. public String getTitle() {
  74. return title;
  75. }
  76. public void setTitle(String title) {
  77. this.title = title;
  78. }
  79. public String getTitleImg() {
  80. return titleImg;
  81. }
  82. public void setTitleImg(String titleImg) {
  83. this.titleImg = titleImg;
  84. }
  85. public Integer getType() {
  86. return type;
  87. }
  88. public void setType(Integer type) {
  89. this.type = type;
  90. }
  91. public Integer getHot() {
  92. return hot;
  93. }
  94. public void setHot(Integer hot) {
  95. this.hot = hot;
  96. }
  97. public String getSummary() {
  98. return summary;
  99. }
  100. public void setSummary(String summary) {
  101. this.summary = summary;
  102. }
  103. public String getSource() {
  104. return source;
  105. }
  106. public void setSource(String source) {
  107. this.source = source;
  108. }
  109. public String getCreateTimeFormattedDate() {
  110. if (this.createTime == null) {
  111. return null;
  112. } else {
  113. return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDD);
  114. }
  115. }
  116. public String getCreateTimeFormattedDate_md() {
  117. if (this.createTime == null) {
  118. return null;
  119. } else {
  120. return DateFormatUtils.format(this.createTime, AFTConstants.MMDD);
  121. }
  122. }
  123. public String getCreateTimeFormattedDate_y() {
  124. if (this.createTime == null) {
  125. return null;
  126. } else {
  127. return DateFormatUtils.format(this.createTime, AFTConstants.YYYY);
  128. }
  129. }
  130. }