Browse Source

Merge remote-tracking branch 'origin/test'

limin 7 years ago
parent
commit
2a491b79aa

+ 48 - 48
src/main/java/com/goafanti/achievement/bo/AchievementEntity.java

@@ -8,29 +8,29 @@ public class AchievementEntity {
     private String field1;//行业---字符串
     private String field2;//行业---字符串
     private String field3;//行业---字符串
-    private int isHot;//热门
+    private Integer isHot;//热门
     private Date releaseDate;//发布时间
-    private int interestCount;//收藏数
+    private Integer interestCount;//收藏数
     private String id;//id
-    private int dataCategory;//成果类型
+    private Integer dataCategory;//成果类型
     private String name;//成果名称
-    private int category;//知识产权分类
+    private Integer category;//知识产权分类
     private String summary;//简介
     private String introduction;//介绍
     private String technicalPictureUrl;//图片
-    private int fieldA;//行业
-    private int fieldB;//行业
-    private int fieldC;//行业
-    private int maturity;//成熟度
-    private int innovation;//创新度
-    private int transferMode;//交易形式
+    private Integer fieldA;//行业
+    private Integer fieldB;//行业
+    private Integer fieldC;//行业
+    private Integer maturity;//成熟度
+    private Integer innovation;//创新度
+    private Integer transferMode;//交易形式
     private BigDecimal transferPrice;//价格
-    private int status;//状态
-    private int releaseStatus;//发布状态
-    private int auditStatus;//审核状态
-    private int boutique;//是否精品
-    private int interest;//是否感兴趣
-    private int orderCount;//订单数
+    private Integer status;//状态
+    private Integer releaseStatus;//发布状态
+    private Integer auditStatus;//审核状态
+    private Integer boutique;//是否精品
+    private Integer interest;//是否感兴趣
+    private Integer orderCount;//订单数
 
     public String getField2() {
 		return field2;
@@ -48,19 +48,19 @@ public class AchievementEntity {
 		this.field3 = field3;
 	}
 
-	public int getFieldB() {
+	public Integer getFieldB() {
 		return fieldB;
 	}
 
-	public void setFieldB(int fieldB) {
+	public void setFieldB(Integer fieldB) {
 		this.fieldB = fieldB;
 	}
 
-	public int getFieldC() {
+	public Integer getFieldC() {
 		return fieldC;
 	}
 
-	public void setFieldC(int fieldC) {
+	public void setFieldC(Integer fieldC) {
 		this.fieldC = fieldC;
 	}
 
@@ -72,11 +72,11 @@ public class AchievementEntity {
         this.field1 = field1;
     }
 
-    public int getIsHot() {
+    public Integer getIsHot() {
         return isHot;
     }
 
-    public void setIsHot(int isHot) {
+    public void setIsHot(Integer isHot) {
         this.isHot = isHot;
     }
 
@@ -88,11 +88,11 @@ public class AchievementEntity {
         this.releaseDate = releaseDate;
     }
 
-    public int getInterestCount() {
+    public Integer getInterestCount() {
         return interestCount;
     }
 
-    public void setInterestCount(int interestCount) {
+    public void setInterestCount(Integer interestCount) {
         this.interestCount = interestCount;
     }
 
@@ -104,11 +104,11 @@ public class AchievementEntity {
         this.id = id;
     }
 
-    public int getDataCategory() {
+    public Integer getDataCategory() {
         return dataCategory;
     }
 
-    public void setDataCategory(int dataCategory) {
+    public void setDataCategory(Integer dataCategory) {
         this.dataCategory = dataCategory;
     }
 
@@ -120,11 +120,11 @@ public class AchievementEntity {
         this.name = name;
     }
 
-    public int getCategory() {
+    public Integer getCategory() {
         return category;
     }
 
-    public void setCategory(int category) {
+    public void setCategory(Integer category) {
         this.category = category;
     }
 
@@ -152,35 +152,35 @@ public class AchievementEntity {
         this.technicalPictureUrl = technicalPictureUrl;
     }
 
-    public int getFieldA() {
+    public Integer getFieldA() {
         return fieldA;
     }
 
-    public void setFieldA(int fieldA) {
+    public void setFieldA(Integer fieldA) {
         this.fieldA = fieldA;
     }
 
-    public int getMaturity() {
+    public Integer getMaturity() {
         return maturity;
     }
 
-    public void setMaturity(int maturity) {
+    public void setMaturity(Integer maturity) {
         this.maturity = maturity;
     }
 
-    public int getInnovation() {
+    public Integer getInnovation() {
         return innovation;
     }
 
-    public void setInnovation(int innovation) {
+    public void setInnovation(Integer innovation) {
         this.innovation = innovation;
     }
 
-    public int getTransferMode() {
+    public Integer getTransferMode() {
         return transferMode;
     }
 
-    public void setTransferMode(int transferMode) {
+    public void setTransferMode(Integer transferMode) {
         this.transferMode = transferMode;
     }
 
@@ -192,51 +192,51 @@ public class AchievementEntity {
         this.transferPrice = transferPrice;
     }
 
-    public int getStatus() {
+    public Integer getStatus() {
         return status;
     }
 
-    public void setStatus(int status) {
+    public void setStatus(Integer status) {
         this.status = status;
     }
 
-    public int getReleaseStatus() {
+    public Integer getReleaseStatus() {
         return releaseStatus;
     }
 
-    public void setReleaseStatus(int releaseStatus) {
+    public void setReleaseStatus(Integer releaseStatus) {
         this.releaseStatus = releaseStatus;
     }
 
-    public int getAuditStatus() {
+    public Integer getAuditStatus() {
         return auditStatus;
     }
 
-    public void setAuditStatus(int auditStatus) {
+    public void setAuditStatus(Integer auditStatus) {
         this.auditStatus = auditStatus;
     }
 
-    public int getBoutique() {
+    public Integer getBoutique() {
         return boutique;
     }
 
-    public void setBoutique(int boutique) {
+    public void setBoutique(Integer boutique) {
         this.boutique = boutique;
     }
 
-    public int getInterest() {
+    public Integer getInterest() {
         return interest;
     }
 
-    public void setInterest(int interested) {
+    public void setInterest(Integer interested) {
         this.interest = interested;
     }
 
-    public int getOrderCount() {
+    public Integer getOrderCount() {
         return orderCount;
     }
 
-    public void setOrderCount(int orderCount) {
+    public void setOrderCount(Integer orderCount) {
         this.orderCount = orderCount;
     }
 

+ 1 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -646,7 +646,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			params.put("fieldA", fieldA);
 		}
 		if (null != dataCategory) {
-			params.put("dataCategory", dataCategory);
+			params.put("dataCategory", 	String.valueOf(dataCategory));
 		}											
 		if (null != TokenManager.getUserId()) params.put("uid", TokenManager.getUserId());
 		

+ 9 - 7
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -668,7 +668,7 @@
 		and  a.keyword like CONCAT('%',#{keyword,jdbcType=VARCHAR},'%')
 	</if>
 	<if test="dataCategory != null and dataCategory != ''">
-  		and a.data_category = #{dataCategory,jdbcType=INTEGER}
+  		and a.data_category = #{dataCategory,jdbcType=VARCHAR}
   	</if>
   	<if test="category != null">
   		and a.category = #{category,jdbcType=INTEGER}
@@ -691,7 +691,6 @@
 	<if test="releaseStatus != null">
 	   and  a.release_status = #{releaseStatus,jdbcType=INTEGER}
 	</if>
-	
 	order by a.release_date desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -702,7 +701,7 @@
   	select 
   		count(1)
   from achievement a
-  	where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1 and a.release_status=1
+  	where a.deleted_sign = 0 and a.audit_status = 2 and a.info_sources=1 
 	<if test="ownerId != null">
   	and a.owner_id = #{ownerId,jdbcType=VARCHAR}
   	</if>
@@ -1280,7 +1279,8 @@ order by release_date limit #{0}
   		a.category,
   		a.data_category as dataCategory,
   		a.name, 
-  		a.release_date as releaseDate, 
+  		a.release_date as releaseDate,
+  		a.create_time as createTime, 
   		a.audit_status as auditStatus,
   		a.boutique,
   		if(isnull(c.interestCount),0,c.interestCount) as interestCount,
@@ -1414,7 +1414,7 @@ where
   	where ai.uid=#{uid,jdbcType=VARCHAR}
   	</select>
   	<select id="selectAppAchuevementDetail" resultType="com.goafanti.achievement.bo.AchievementEntity">
-  	select a.id,a.name,a.keyword,a.data_category,a.summary,a.introduction,a.transfer_mode as transferMode,a.status,a.transfer_price as transferPrice ,a.innovation,a.maturity,a.audit_status,a.technical_picture_url as technicalPictureUrl,
+  	select a.id,a.name,a.keyword,a.data_category as dataCategory,a.summary,a.introduction,a.transfer_mode as transferMode,a.status,a.transfer_price as transferPrice ,a.innovation,a.maturity,a.audit_status,a.technical_picture_url as technicalPictureUrl,
   a.field_a as fieldA,a.field_b as fieldB,a.field_c as fieldC,f.name as field1,f2.name as field2,f3.name as field3,a.release_status as releaseStatus,a.audit_status as auditStatus,a.boutique,a.field_a as fieldA,a.is_hot as isHot,a.release_date as releaseDate,if(isnull(b.count),0,b.count) as interestCount,
   if(isnull(d.achievement_id),0,1) interest,ifnull(t.count,0) as orderCount
    from achievement a left join industry_category f on a.field_a=f.id
@@ -1433,7 +1433,8 @@ where
   	from achievement a
   	left join achievement_interest ai on ai.achievement_id=a.id
   	left join field_glossory b on a.field_a= b.id
-  	where ai.uid= #{uid,jdbcType=VARCHAR}
+  	where  a.deleted_sign=0
+  	and ai.uid= #{uid,jdbcType=VARCHAR}
   	order by ai.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
@@ -1444,6 +1445,7 @@ where
   		count(0)
   	from achievement a
   	left join achievement_interest ai on ai.achievement_id=a.id
-  	where ai.uid=#{uid,jdbcType=VARCHAR}
+  	  	where  a.deleted_sign=0
+  	and ai.uid= #{uid,jdbcType=VARCHAR}
   	</select>
 </mapper>

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

@@ -1193,7 +1193,8 @@ order by release_date desc limit #{0}
    from demand a
    left join demand_interest di on di.demand_id=a.id
    left join field_glossory b on a.industry_category_a= b.id
-   where di.uid= #{uid,jdbcType=VARCHAR}
+     where a.deleted_sign=0 
+   and di.uid= #{uid,jdbcType=VARCHAR}
    order by di.create_time desc
     <if test="page_sql !=null">
   	 ${page_sql}
@@ -1203,6 +1204,7 @@ order by release_date desc limit #{0}
    select count(0)
    from demand a
    left join demand_interest di on di.demand_id=a.id
-   where di.uid=#{uid,jdbcType=VARCHAR}
+     where a.deleted_sign=0 
+   and di.uid= #{uid,jdbcType=VARCHAR}
    </select>
   </mapper>

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

@@ -781,7 +781,7 @@
   select 
   	  jtbp.id,  
 	  jtbp.name, 
-	  jtbp.introduce as introduction,  
+	  jtbp.advertisement as introduction, 
 	  jtbp.price as textA,
 	  u.nickname as ownerName,
 	  jtbp.min_img_url as ImgUrl,
@@ -809,7 +809,7 @@
   
    <select id="recommendedApplicationList" resultType="com.goafanti.common.bo.MyCollection">
   select a.id,a.name,a.advertisement as introduction,a.price as textA,
-  		c.nickname as ownerName,ifnull(d.count,0) as interestCount
+  		c.nickname as ownerName,ifnull(d.count,0) as interestCount,a.min_img_url as ImgUrl
   	from jt_business_project a
   	left join jt_business_category b on  a.category_id=b.id
   	left join user c on a.owner_id=c.id
@@ -822,7 +822,7 @@
   	<if test="type==2">
   	and b.module = 5 
   	</if>
-  	order by a.create_time desc
+  	order by a.release_date desc
   <if test="page_sql!=null">
 		${page_sql}
 	</if>

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

@@ -572,6 +572,7 @@ count(0)
   <if test="orderType!=null ">
   and (x.commodityType=#{orderType,jdbcType=INTEGER} or (#{orderType,jdbcType=INTEGER}=10 and (x.commodityType=1 or x.commodityType=0)))
   </if>
+  order by x.createTime desc
   <if test="page_sql!=null">
 			${page_sql}
 	</if>

+ 7 - 0
src/main/java/com/goafanti/demand/bo/AppDemandBo.java

@@ -24,6 +24,7 @@ public class AppDemandBo {
 	    private BigDecimal fixedBudget;//固定预算
 	    private BigDecimal crowdCost;//资金需求金额
 	    private BigDecimal budgetCost;
+	    private Date createTime;
 		public int getFieldA() {
 			return fieldA;
 		}
@@ -144,4 +145,10 @@ public class AppDemandBo {
 		public void setBudgetCost(BigDecimal budgetCost) {
 			this.budgetCost = budgetCost;
 		}
+		public Date getCreateTime() {
+			return createTime;
+		}
+		public void setCreateTime(Date createTime) {
+			this.createTime = createTime;
+		}
 }

+ 7 - 1
src/main/java/com/goafanti/order/service/impl/JtOrderServiceImpl.java

@@ -213,13 +213,19 @@ public class JtOrderServiceImpl extends BaseMybatisDao<JtOrderMapper> implements
 					if (null!=j.getCommodityType()) {
 						if (j.getCommodityType()==1||j.getCommodityType()==0) {
 							JtBusinessProject bp=JtBusinessProjectMapper.selectByPrimaryKey(j.getCommodityId());
-							j.setImgUrl(bp.getMinImgUrl());
+							if (null!=bp) {
+								j.setImgUrl(bp.getMinImgUrl());
+							}
 						}else if (j.getCommodityType()==2) {
 							Achievement a=achievementMapper.selectByPrimaryKey(j.getCommodityId());
+							if (null!=a) {
 							j.setImgUrl(a.getTechnicalPictureUrl());
+							}
 						}else if (j.getCommodityType()==3) {
 							Demand d=demandMapper.selectByPrimaryKey(j.getCommodityId());
+							if (null!=d) {
 							j.setImgUrl(d.getPictureUrl());
+							}
 						}
 					}
 				}

+ 7 - 0
src/main/java/com/goafanti/portal/bo/AchievementObject.java

@@ -25,6 +25,7 @@ public class AchievementObject extends InputAchievement {
 	private String dataCategoryS;
 	private String firstPicture;
 	private String city;
+	private Date  createTime;
 
 	public String getCity() {
 		return city;
@@ -159,6 +160,12 @@ public class AchievementObject extends InputAchievement {
 	public void setIfInterest(String ifInterest) {
 		this.ifInterest = ifInterest;
 	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}