瀏覽代碼

待评价数量sql修改

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