Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT

wubb 8 years ago
parent
commit
a8a4c1c27c

+ 4 - 1
src/main/java/com/goafanti/common/model/News.java

@@ -4,6 +4,8 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.constant.AFTConstants;
 
 public class News {
@@ -66,7 +68,8 @@ public class News {
 	 * 内容
 	 */
 	private String	content;
-
+	
+	@JsonFormat(shape = Shape.STRING)
 	public Long getId() {
 		return id;
 	}

+ 18 - 24
src/main/webapp/WEB-INF/views/portal/news/newsDetails.html

@@ -52,10 +52,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>
@@ -78,10 +77,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>
@@ -104,10 +102,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>
@@ -130,10 +127,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>
@@ -156,10 +152,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>
@@ -182,10 +177,9 @@
 							</div>
 							<div class="newsDetails_txt">
 								<p th:text="${it.summary}"></p>
-								<p th:utext="${it.content}">
-									<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
-								</p>
-								<span th:text="${it.source}"></span> <i th:text="${it.createTimeFormattedDate}"></i>
+								<a th:href="${'/portal/news/newsDetail.html?newsId=' + it.id}">[详细]</a>
+								<span th:text="${it.source}"></span> <i
+									th:text="${it.createTimeFormattedDate}"></i>
 							</div>
 						</div>
 					</li>