Bladeren bron

Merge remote-tracking branch 'origin/patch' into test

anderx 7 jaren geleden
bovenliggende
commit
39847ce613

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

@@ -622,9 +622,11 @@
 	  jtbp.release_Date as releaseDate,
 	  jtbp.advertisement,
 	  ifnull(dct.dealCount,0) as dealCount,
+	  ifnull(x.count,0) as interestCount,
 	  u.identify_name as companyName,u.id as companyId
   from jt_business_project jtbp
   left join user u on u.id=jtbp.owner_id
+  left join (select project_id as id,count(*) as count from project_interest group by project_id)x on jtbp.id=x.id
   left join (select sum(commodity_quantity) as dealCount ,commodity_id from jt_order_detail group by commodity_id) dct on jtbp.id=dct.commodity_id
   <if test="topId!=null">
   left join jt_business_category jtbc on jtbc.super_id =#{topId,jdbcType=VARCHAR}

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

@@ -57,7 +57,7 @@ public class JtOrderServiceImpl extends BaseMybatisDao<JtOrderMapper> implements
 			switch(order.getCommodityType()) {
 			case 0:{
 				JtBusinessProjectResult jtBusinessProject=JtBusinessProjectMapper.selectByPrimaryKeyWithModule(order.getCommodityId(),null);
-				if(jtBusinessProject==null || jtBusinessProject.getModule()!=0)return -1;
+				if(jtBusinessProject==null)return -1;
 				else {
 					jtOrder.setSellerId(jtBusinessProject.getOwnerId());
 					jtOrderDetail.setCommodityName(jtBusinessProject.getName());