|
@@ -1,7 +1,12 @@
|
|
|
package com.uas.cloud.mall.shop.news.model;
|
|
|
|
|
|
-import javax.persistence.*;
|
|
|
-import java.util.*;
|
|
|
+import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
+
|
|
|
+import javax.persistence.Column;
|
|
|
+import javax.persistence.Entity;
|
|
|
+import javax.persistence.Id;
|
|
|
+import javax.persistence.Table;
|
|
|
+import java.util.Date;
|
|
|
|
|
|
|
|
|
* 资讯
|
|
@@ -11,8 +16,11 @@ import java.util.*;
|
|
|
|
|
|
@Entity
|
|
|
@Table(name = "jpress_content")
|
|
|
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
public class News{
|
|
|
|
|
|
+
|
|
|
+
|
|
|
private static final String INDEX_USOFTCHINA = "10.10.100.88:9090/";
|
|
|
|
|
|
private static final String NEWS_TEXT = "c/";
|
|
@@ -27,17 +35,17 @@ public class News{
|
|
|
@Column(name = "title")
|
|
|
private String title;
|
|
|
|
|
|
-
|
|
|
- * 摘要
|
|
|
- */
|
|
|
- @Column(name = "summary")
|
|
|
- private String summary;
|
|
|
-
|
|
|
-
|
|
|
- * 内容
|
|
|
- */
|
|
|
- @Column(name = "text")
|
|
|
- private String content;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
* 缩略图
|
|
@@ -81,10 +89,8 @@ public class News{
|
|
|
|
|
|
public News() {}
|
|
|
|
|
|
- public News(String title, String summary, String content, String thumbnail, String hrefUrl, Long viewCount, Date created, Date modified , String url_suffix) {
|
|
|
+ public News(String title, String thumbnail, String hrefUrl, Long viewCount, Date created, Date modified , String url_suffix) {
|
|
|
this.title = title;
|
|
|
- this.summary = summary;
|
|
|
- this.content = content;
|
|
|
this.thumbnail = thumbnail;
|
|
|
this.hrefUrl = hrefUrl;
|
|
|
this.viewCount = viewCount;
|
|
@@ -109,22 +115,6 @@ public class News{
|
|
|
this.title = title;
|
|
|
}
|
|
|
|
|
|
- public String getSummary() {
|
|
|
- return summary;
|
|
|
- }
|
|
|
-
|
|
|
- public void setSummary(String summary) {
|
|
|
- this.summary = summary;
|
|
|
- }
|
|
|
-
|
|
|
- public String getContent() {
|
|
|
- return content;
|
|
|
- }
|
|
|
-
|
|
|
- public void setContent(String content) {
|
|
|
- this.content = content;
|
|
|
- }
|
|
|
-
|
|
|
public String getThumbnail() {
|
|
|
return thumbnail;
|
|
|
}
|
|
@@ -135,6 +125,7 @@ public class News{
|
|
|
|
|
|
|
|
|
public String getHrefUrl() {
|
|
|
+ System.out.println(INDEX_USOFTCHINA);
|
|
|
StringBuffer linkTo = new StringBuffer();
|
|
|
linkTo.append(INDEX_USOFTCHINA);
|
|
|
linkTo.append(NEWS_TEXT);
|