Browse Source

我的成果、需求显示发布时间更改为创建时间

anderx 8 years ago
parent
commit
a72c74baf1

+ 1 - 1
src/main/java/com/goafanti/achievement/bo/AchievementListBo.java

@@ -445,7 +445,7 @@ public class AchievementListBo {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 
 	}

+ 20 - 0
src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java

@@ -47,6 +47,11 @@ public class AchievementPartnerListBo {
 	 * 发布时间
 	 */
 	private Date		releaseDate;
+	
+	/**
+	 * 创建时间
+	 */
+	private Date		createTime;
 
 	/**
 	 * 应用领域1
@@ -285,6 +290,21 @@ public class AchievementPartnerListBo {
 	public void setOwnerPostalAddress(String ownerPostalAddress) {
 		this.ownerPostalAddress = ownerPostalAddress;
 	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
 	
 	
 	

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

@@ -1766,7 +1766,7 @@
   	  
   select 
 	  a.id, a.boutique,a.name,a.category, a.audit_status as auditStatus,ifnull(t.x,0) as buyIntention,
-	  a.release_date as releaseDate,ifnull(i.y,0) as countInterest
+	  a.release_date as releaseDate,a.create_time as createTime,ifnull(i.y,0) as countInterest
 	from  achievement a 
 	left join (select count(0) as x, tl.commodity_id from t_order tr
 				left join t_order_detail tl on tr.order_no=tl.order_no
@@ -1778,6 +1778,7 @@
 	<if test="ownerId != null">
   	and a.owner_id = #{ownerId,jdbcType=VARCHAR}
   	</if>
+  	order by a.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>

+ 2 - 3
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1535,10 +1535,9 @@
   </select>
   
   <select id="findAppMyDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
-  		
-	select 
+  	select 
 	  d.id, d.boutique,d.name, d.audit_status as auditStatus,ifnull(t.x,0) as orderCount,
-	  d.release_date as releaseDate,ifnull(i.y,0) as countInterest
+	  d.release_date as releaseDate,d.create_time as createTime,ifnull(i.y,0) as countInterest
 	from  demand d 
 	left join (select count(0) as x,tl.commodity_id from t_order tr
 				left join t_order_detail tl on tl.order_no=tr.order_no

+ 1 - 1
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -378,7 +378,7 @@ public class DemandListBo {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}