Browse Source

服务页面获取品类下的项目新增项目地址

anderx 8 years ago
parent
commit
eaa86e7788

+ 15 - 0
src/main/java/com/goafanti/app/bo/ProjectBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.app.bo;
 
+import com.goafanti.common.utils.StringUtils;
+
 public class ProjectBo {
 	private String id;
 	
@@ -12,6 +14,8 @@ public class ProjectBo {
 	private String interestCount;
 	
 	private String boutique;
+	
+	private String projectUrl;
 
 	public String getId() {
 		return id;
@@ -60,4 +64,15 @@ public class ProjectBo {
 	public void setBoutique(String boutique) {
 		this.boutique = boutique;
 	}
+
+	public String getProjectUrl() {
+		if (StringUtils.isBlank(projectUrl)) {
+			return "";
+		}
+		return projectUrl;
+	}
+
+	public void setProjectUrl(String projectUrl) {
+		this.projectUrl = projectUrl;
+	}
 }

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

@@ -714,7 +714,7 @@
     where bname = #{bname,jdbcType=VARCHAR}
   </select>
   <select id="getBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
-  select id,bname as name,min_logo as minLogoUrl,introduce
+  	select id,bname as name,min_logo as minLogoUrl,introduce,project_url as projectUrl
    from business_project
 	where delete_sign=0 
 	and status=0
@@ -738,7 +738,8 @@
   
   
   <select id="findRecommendProjectListByPage" resultType="com.goafanti.app.bo.ProjectBo">
- 		select b.id,b.bname as name,b.min_logo as minLogoUrl,b.introduce,b.boutique,ifnull(t.interestCount,0) as interestCount
+ 		select b.id,b.bname as name,b.min_logo as minLogoUrl,b.introduce,b.boutique,
+ 				ifnull(t.interestCount,0) as interestCount,project_url as projectUrl
   		from business_project b
   		left join (select count(0)  as interestCount ,project_id from project_interest 
 				group by project_id) t on b.id=t.project_id