Browse Source

Merge branch 'test' of git@git.coding.net:aft/AFT.git into test

wanghui 8 years ago
parent
commit
1bb5f96952

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

@@ -245,7 +245,8 @@ public class AchievementPartnerListBo {
 	
 
 	public String getCountInterest() {
-		return countInterest;
+	    
+		return String.valueOf(Integer.valueOf(countInterest)+128);
 	}
 
 	public void setCountInterest(String countInterest) {

+ 9 - 0
src/main/java/com/goafanti/app/bo/ProjectDetailBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.app.bo;
 
+import java.util.List;
+
 public class ProjectDetailBo {
 	private String id;
 	private String name;
@@ -8,6 +10,7 @@ public class ProjectDetailBo {
 	private String clientSize;
 	private String interest;
 	private String maxLogo;
+	private List<String> projectSize;
 	public String getId() {
 		return id;
 	}
@@ -50,4 +53,10 @@ public class ProjectDetailBo {
 	public void setMaxLogo(String maxLogo) {
 		this.maxLogo = maxLogo;
 	}
+	public List<String> getProjectSize() {
+		return projectSize;
+	}
+	public void setProjectSize(List<String> projectSize) {
+		this.projectSize = projectSize;
+	}
 }

+ 2 - 1
src/main/java/com/goafanti/business/service/BusinessProjectService.java

@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.goafanti.app.bo.ProjectBo;
+import com.goafanti.app.bo.ProjectDetailBo;
 import com.goafanti.business.bo.BusinessProjectBo;
 import com.goafanti.business.bo.ProjectSizeBo;
 import com.goafanti.common.model.BusinessProject;
@@ -22,7 +23,7 @@ public interface BusinessProjectService {
 	
 	int updateStopProject(String id);
 	
-	List<Object> orgProject(String id);
+	ProjectDetailBo orgProject(String id);
 	
 	BusinessProjectBo orgProjects(String id);
 	

+ 3 - 7
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -149,19 +149,15 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		return bpo;
 	}
 	@Override
-	public List<Object> orgProject(String id) {
+	public ProjectDetailBo orgProject(String id) {
 		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
 		if (StringUtils.isNotBlank(TokenManager.getUserId())&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
 			pd.setInterest("1");
 		}else {
 			pd.setInterest("0");
 		}
-		
-		List<Object> l=new ArrayList<>();
-		l.add(pd );
-		List<String> l2=projectSizeMapper.selectPidList(id);
-		l.add(l2);
-		return l;
+		pd.setProjectSize(projectSizeMapper.selectPidList(id));
+		return pd;
 	}
 	
 	@Override

+ 8 - 6
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1228,7 +1228,7 @@
 	</select>
   
   <select id="selectUserOwnerDetail" parameterType="java.lang.String" resultType="com.goafanti.achievement.bo.AchievementUserOwnerDetailBo">
-     select  
+     	select  
 		  	a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
 		  	a.name, a.keyword, a.category, 
 		  	a.summary, a.introduction, a.technical_picture_url as technicalPictureUrl, 
@@ -1249,12 +1249,14 @@
 			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount
     from achievement a
     left join user_identity ui on a.owner_id = ui.uid
-    left join (select count(0) as x,commodity_id from t_order
+    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
 				where order_status != 4
-				group by  commodity_id ) t on a.id=t.commodity_id 
-	left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t2 on a.id=t2.commodity_id 
+				group by  tl.commodity_id ) t on a.id=t.commodity_id 
+	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
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
     left join jpush_easemob_account j on a.owner_id=j.uid
     left join user u on u.id = a.owner_id
   where a.id =#{id,jdbcType=VARCHAR}

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

@@ -745,6 +745,7 @@
 				group by project_id) t on b.id=t.project_id
   		where b.delete_sign=0 
   		and b.status=0
+  		and boutique=1
   		order by b.boutique desc
   		<if test="page_sql!=null">
 			${page_sql}

+ 8 - 6
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -60,7 +60,7 @@
     where id = #{id,jdbcType=VARCHAR}
   </select>
   <select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.DemandListBo" parameterType="java.lang.String" >
-     select 
+    	select 
     d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA, 
     d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, d.problem_des AS problemDes, d.technical_requirements AS technicalRequirements, 
     d.picture_url AS pictureUrl, d.text_file_url AS textFileUrl, d.video_url AS videoUrl, d.fixed_budget AS fixedBudget, d.fixed_cycle AS fixedCycle, d.people_number AS peopleNumber, 
@@ -71,12 +71,14 @@
     ,ifnull(t.x,0) as orderIntentionCount,ifnull(t2.x,0) as orderCount,j.easemob_name as easemobName
     from demand d
     left join jpush_easemob_account j on d.employer_id=j.uid
-    left join (select count(0) as x,commodity_id from t_order
+    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
 				where order_status != 4
-				group by  commodity_id ) t on d.id=t.commodity_id
-    left join (select count(0) as x,commodity_id from t_order
-				where order_status != 4 and order_status != 0
-				group by  commodity_id ) t2 on d.id=t2.commodity_id 
+				group by  tl.commodity_id) t on d.id=t.commodity_id
+    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
+				where tr.order_status != 4 and tr.order_status != 0
+				group by  tl.commodity_id ) t2 on d.id=t2.commodity_id 
     where d.id =  #{id,jdbcType=VARCHAR}
 	</select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >

+ 0 - 1
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -871,7 +871,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		if (StringUtils.isNotBlank(TokenManager.getUserId())) {
 			params.put("uid", TokenManager.getUserId());
 		}
-		params.put("uid", "904d1d5a-30f6-4813-b632-1ff07a1ad317");
 		if (type==InterestType.POLICY.getCode()) {
 			Pagination<ObjectInterestListBo> p=(Pagination<ObjectInterestListBo>) findPage("findAppNewsInterestByPage", "findAppNewsInterestCount", params, pNo, pSize);
 			List<ObjectInterestListBo> l=(List<ObjectInterestListBo>) p.getList();