Parcourir la source

新闻显示发布时间调整

anderx il y a 3 ans
Parent
commit
756749ef5f

+ 3 - 3
src/main/java/com/goafanti/common/bo/PolicyEntity.java

@@ -17,13 +17,13 @@ String titleImg;
 String source;
 //String firstPictureUrl;
 String sourceUrl;
-String releaseDate;
+Date releaseDate;
 
-	public String getReleaseDate() {
+	public Date getReleaseDate() {
 		return releaseDate;
 	}
 
-	public void setReleaseDate(String releaseDate) {
+	public void setReleaseDate(Date releaseDate) {
 		this.releaseDate = releaseDate;
 	}
 

+ 3 - 1
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1190,7 +1190,9 @@ order by release_date desc limit #{0}
 </select>
 
 <select id="getIntellectualProperty" resultType="com.goafanti.common.bo.PolicyEntity" >
-select p.id,p.title,p.title_img as titleImg,p.summary,dg1.name as provinceS,dg2.name as cityS,edit_time as editTime ,create_time as createTime,p.id,p.source,p.source_url as sourceUrl  from policy p
+select p.id,p.title,p.title_img as titleImg,p.summary,dg1.name as provinceS,dg2.name as cityS,
+       edit_time as editTime ,create_time as createTime,p.release_date as releaseDate,
+       p.id,p.source,p.source_url as sourceUrl  from policy p
 left join district_glossory dg1 on dg1.id=p.province
 left join district_glossory dg2 on dg2.id=p.city
 where audit_status = 2

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -276,7 +276,7 @@
 			a.summary,
 			a.source,
 			a.content,
-            DATE_FORMAT(a.release_date,'%Y-%m-%d')  as releaseDate
+            a.release_date  as releaseDate
 		from news a
 		where 1=1
 		 and (a.type = 0 or a.type = 99 or a.type =98)

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/news/newsDetail.html

@@ -53,7 +53,7 @@
 				<div th:each="newsList:${newsList}">
 					<h5 ><a th:href="@{/portal/news/newsDetail(id=${newsList.id},type=${type})}"  th:text="${newsList.title}?${newsList.title}:''"></a></h5>
 					 <!-- <img th:src="${avatarUploadHost+newsDetail.titleImg}" alt="" /> -->
-					<p th:text="${newsList.createTime}?${#dates.format(newsList.createTime,'yyyy-MM-dd')}:''"></p>
+					<p th:text="${newsList.releaseDate}?${newsList.releaseDate}:''"></p>
 				</div>
 			</div>
 		</div>