Browse Source

首页改版

Michael_9527 8 years ago
parent
commit
d02381aa38

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

@@ -358,7 +358,7 @@
 		where mm.effective =1 and x.audit_status=3 and x.deleted_sign = 0 and mm.show_page= #{showPage,jdbcType=VARCHAR}
   	</if>
   	<if test="category == 2"> <!-- 需求 -->
-  		select mm.product_id as productId,x.data_category as ownerType,x.name,mm.cover_img as coverImg
+  		select mm.product_id as productId,x.data_category as ownerType,x.name,mm.cover_img as coverImg,x.problem_des
 		from marketing_management mm left join demand x on mm.product_id = x.id
 		where mm.effective =1  and x.audit_status =3 and x.deleted_sign = 0 and mm.show_page= #{showPage,jdbcType=VARCHAR}
   	</if>

+ 8 - 0
src/main/java/com/goafanti/marketing/bo/MarketingManagementBo.java

@@ -6,9 +6,17 @@ public class MarketingManagementBo extends MarketingManagement{
 	private String name; /** 名字 **/
 	private String summary; /** 简介 **/
 	private String ownerType; /** 用户类型 **/
+	private String problem_des;/** 问题说明 **/
+	
 	public String getName() {
 		return name;
 	}
+	public String getProblem_des() {
+		return problem_des;
+	}
+	public void setProblem_des(String problem_des) {
+		this.problem_des = problem_des;
+	}
 	public void setName(String name) {
 		this.name = name;
 	}

+ 20 - 1
src/main/java/com/goafanti/news/bo/NewsSummary.java

@@ -113,7 +113,6 @@ public class NewsSummary {
 	public void setSource(String source) {
 		this.source = source;
 	}
-
 	public String getCreateTimeFormattedDate() {
 		if (this.createTime == null) {
 			return null;
@@ -121,9 +120,29 @@ public class NewsSummary {
 			return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDD);
 		}
 	}
+	public String getCreateTimeFormattedDate_md() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.createTime, AFTConstants.MMDD);
+		}
+	}
+	public String getCreateTimeFormattedDate_y() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.createTime, AFTConstants.YYYY);
+		}
+	}
 
 	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
 
 	}
+	public void setCreateTimeFormattedDate_md(String createTimeFormattedDate) {
+
+	}
+	public void setCreateTimeFormattedDate_y(String createTimeFormattedDate) {
+
+	}
 
 }

+ 10 - 11
src/main/webapp/WEB-INF/views/portal/index.html

@@ -123,11 +123,10 @@
 							<img th:src="${avatarUploadHost + item.coverImg}" alt=""  />
 							<div>
 								<h5 th:text="${item.name}"></h5>
-								<p><span><img src="../img/index_er4.png" alt="" /></span>广州</p>
+								<p><span><img th:src="${portalHost + '/img/index_er4.png'}"/></span>长沙</p>
 							</div>
 						</div>
-						<p class="demand_p">没食子酸在高温和中压条件下可以脱去羧基,从而获得焦性没食子酸,再通过升华的方式获得较纯的焦性没食子产品,
-							单升华方式产能较低且能耗高,希望通过其他方式(重结晶)等获得此产品,提高产品的产能降低能耗。 </p>
+						<p class="demand_p" th:text="${item.problem_des}"></p>
 					</div>	
 					</a>
 				</div>										
@@ -146,8 +145,8 @@
 					<a th:if="${#lists.size(jtdt) ge 1}" th:href="@{/portal/news/newsDetail(id=${jtdt[0].id})}" >
 						<div >
 							<div class="policy_date">
-							<h4>10.25</h4>
-							<p th:text=${jtdt[0].createTimeFormattedDate}></p>
+							<h4 th:text=${jtdt[0].createTimeFormattedDate_md}></h4>
+							<p th:text=${jtdt[0].createTimeFormattedDate_y}></p>
 							</div>
 							<div class="policy_line"></div>
 							<div class="policy_p_cont">
@@ -159,8 +158,8 @@
 					<a th:if="${#lists.size(jtdt) ge 2}" th:href="@{/portal/news/newsDetail(id=${jtdt[1].id})}">
 						<div >
 							<div class="policy_date">
-							<h4>10.25</h4>
-							<p th:text=${jtdt[1].createTimeFormattedDate}></p>
+							<h4 th:text=${jtdt[1].createTimeFormattedDate_md}></h4>
+							<p th:text=${jtdt[1].createTimeFormattedDate_y}></p>
 							</div>
 							<div class="policy_line"></div>
 							<div class="policy_p_cont">
@@ -172,8 +171,8 @@
 					<a th:if="${#lists.size(jtdt) ge 3}" th:href="@{/portal/news/newsDetail(id=${jtdt[2].id})}">
 						<div >
 							<div class="policy_date">
-							<h4>10.25</h4>
-							<p th:text=${jtdt[2].createTimeFormattedDate}></p>
+							<h4 th:text=${jtdt[2].createTimeFormattedDate_md}></h4>
+							<p th:text=${jtdt[2].createTimeFormattedDate_y}></p>
 							</div>
 							<div class="policy_line"></div>
 							<div class="policy_p_cont">
@@ -185,8 +184,8 @@
 					<a th:if="${#lists.size(jtdt) ge 4}" th:href="@{/portal/news/newsDetail(id=${jtdt[3].id})}">
 						<div >
 							<div class="policy_date">
-							<h4>10.25</h4>
-							<p th:text=${jtdt[3].createTimeFormattedDate}></p>
+							<h4 th:text=${jtdt[3].createTimeFormattedDate_md}></h4>
+							<p th:text=${jtdt[3].createTimeFormattedDate_y}></p>
 							</div>
 							<div class="policy_line"></div>
 							<div class="policy_p_cont">