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

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

@@ -19,13 +19,14 @@
     (SELECT count(1) FROM activity_user where uid=#{uid,jdbcType=VARCHAR}) as activity,
     (SELECT count(1) FROM achievement_order where uid=#{uid,jdbcType=VARCHAR} and deleted_sign=0) as achievement,
     (SELECT count(1) FROM demand_order where uid=#{uid,jdbcType=VARCHAR} and deleted_sign=0) as demand,
+    (SELECT count(1) FROM consult_order where user_id=#{uid,jdbcType=VARCHAR} and order_state < 9) as `date`,
     (SELECT count(1) FROM copyright_info where uid=#{uid,jdbcType=VARCHAR} and delete_sign=0) as copyright
   </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.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  <![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 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  &gt; 0 and ao.status &lt; 9) 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 = 0) as `intention`
   </select>
   <select id="countMyDemand" parameterType="String" resultType="org.springframework.ui.ModelMap">
     select