albertshaw 8 years ago
parent
commit
923eadc392
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/com/goafanti/common/mapper/MyAppMapper.xml

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

@@ -23,13 +23,13 @@
   </select>
   <select id="countMyTech" parameterType="String" resultType="org.springframework.ui.ModelMap">
   	select 
-	(select count(1) from achievement a left join achievement_demand ad on a.id=ad.achievement_id where ad.id is not null and a.owner_id=#{uid,jdbcType=VARCHAR}) as `match`,
+	(select count(1) from achievement a left join achievement_demand ad on a.id=ad.achievement_id where ad.demand_id is not null and a.owner_id=#{uid,jdbcType=VARCHAR}) as `match`,
 	(select count(1) from achievement a left join achievement_order ao on a.id=ao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and ao.status>5 and (ao.service_money>0 or ao.commission>0 or ao.intention_money>0)) as `deal`,
 	(select count(1) from achievement a left join achievement_interest ai on a.id=ai.achievement_id where ai.id is not null and a.owner_id=#{uid,jdbcType=VARCHAR}) as `intention`
   </select>
   <select id="countMyDemand" parameterType="String" resultType="org.springframework.ui.ModelMap">
 	select 
-	(select count(1) from demand d left join achievement_demand ad on d.id=ad.demand_id where ad.id is not null and d.employer_id=#{uid,jdbcType=VARCHAR}) as `match`,
+	(select count(1) from demand d left join achievement_demand ad on d.id=ad.demand_id where ad.demand_id is not null and d.employer_id=#{uid,jdbcType=VARCHAR}) as `match`,
 	(select count(1) from demand d left join demand_order `do` on d.id=`do`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `do`.status>5 and (`do`.service_money>0 or `do`.commission>0 or `do`.intention_money>0)) as `deal`,
 	(select count(1) from demand d left join demand_interest di on d.id=di.demand_id where di.id is not null and d.employer_id=#{uid,jdbcType=VARCHAR}) as `intention`
   </select>