hyq пре 6 година
родитељ
комит
ed047c39de
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml

+ 2 - 1
kmall-api/src/main/resources/mybatis/mapper/ApiOrderMapper.xml

@@ -554,7 +554,8 @@
 
     <select id="queryUcenterMap" resultType="map">
         select count(a.id) as orders, sum(case a.order_status when 0 then 1 else 0 end ) as unPayNum, sum(case a.order_status when 300 then 1 else 0 end ) as unTakeNum
-        ,sum(case a.order_status when 201 then 1 else 0 end ) as unPaymentNum, sum(case a.order_status when 301 then 1 else 0 end ) as unEvalNum
+        ,sum(case a.order_status when 201 then 1 else 0 end ) as unPaymentNum,
+        sum(case a.order_status when 301 then 1 else 0 end and case a.comment_count when 0 then 1 else 0 end ) as unEvalNum
         from mall_order a
         left join mall_comment b on a.id = b.order_id
         where 1 = 1