yumeng 2 년 전
부모
커밋
a39822efa0
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

+ 5 - 1
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -336,7 +336,11 @@
         item_id as 'itemId',
         item_title as 'itemTitle',
         image_url as 'imageUrl',
-        count(oid) as 'orderNum'
+        count(oid) as 'orderNum',
+        sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
+        round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),2) as 'validRadio',
+        sum(case when send_status = 1 then 1 else 0 end) as 'deliveryNum',
+        round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),2) as 'deliveryRadio'
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">