Browse Source

我的关注项目BUG修复

anderx 8 years ago
parent
commit
3e01801557

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

@@ -1683,11 +1683,8 @@
 	</select>
 	
 	<select id="findAppProjectInterestByPage" parameterType="String" resultType="com.goafanti.demand.bo.ObjectInterestListBo">
-  	 select b.id ,b.bname as name,t.uid,t.create_time as createTime,ifnull(x.countInterest,0) as countInterest
+  	 select b.id ,b.bname as name,t.uid,t.create_time as createTime
 	from project_interest t
-	left join (select id,count(0)  as countInterest ,project_id from project_interest
-				group by project_id
-				) x on t.id=x.id  
 	left join business_project  b on t.project_id=b.id
 	where  t.uid=#{uid,jdbcType=VARCHAR}
   	<if test="page_sql!=null">

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

@@ -916,7 +916,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			List<ObjectInterestListBo> l=(List<ObjectInterestListBo>) p.getList();
 			for (ObjectInterestListBo o : l) {
 				int i=projectInterestMapper.countInterest(o.getId());
-				o.setCountInterest(String.valueOf(i));
+				o.setCountInterest(String.valueOf(i));	
 				o.setType(type);
 			}
 			return p;