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

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

@@ -24,13 +24,13 @@
   <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.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_order iao on a.id=iao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and iao.status<6) as `intention`
+	(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  <![CDATA[ > ]]>  5 and (ao.service_money  <![CDATA[ > ]]> 0 or ao.commission <![CDATA[ > ]]> 0 or ao.intention_money <![CDATA[ > ]]> 0)) as `deal`,
+	(select count(1) from achievement a left join achievement_order iao on a.id=iao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and iao.status  <![CDATA[ < ]]> 6) 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.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_order `ido` on d.id=`ido`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `ido`.status<6) as `intention`
+	(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 <![CDATA[ > ]]> 5 and (`do`.service_money <![CDATA[ > ]]> 0 or `do`.commission <![CDATA[ > ]]> 0 or `do`.intention_money <![CDATA[ > ]]> 0)) as `deal`,
+	(select count(1) from demand d left join demand_order `ido` on d.id=`ido`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `ido`.status <![CDATA[ < ]]> 6) as `intention`
   </select>
 </mapper>