yumeng 2 năm trước cách đây
mục cha
commit
9a65df8586

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

@@ -294,16 +294,16 @@
     <select id="getOrderRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
         select
         t1.*,
-        round((t1.orderNum - t2.orderNum) / t2.orderNum,2) as 'radio'
+        round((t1.orderNum - t2.orderNum) / t2.orderNum,4) as 'radio'
         from (select
         item_id as 'itemId',
         item_title as 'itemTitle',
         image_url as 'imageUrl',
         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',
+        round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) 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'
+        round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),4) as 'deliveryRadio'
 
         from kuaishou_supply_chain
         where 1= 1
@@ -338,9 +338,9 @@
         image_url as 'imageUrl',
         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',
+        round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) 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'
+        round(sum(case when send_status = 1 then 1 else 0 end) / sum(case when order_status != 80 then 1 else 0 end),4) as 'deliveryRadio'
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">
@@ -355,13 +355,13 @@
     <select id="getPromoterRankRatioList" resultType="com.alibaba.fastjson.JSONObject">
         select
         t1.*,
-        round((t1.orderNum - t2.orderNum) / t2.orderNum,2) as 'radio'
+        round((t1.orderNum - t2.orderNum) / t2.orderNum,4) as 'radio'
         from (select
         promoter_id as 'promoterId',
         promoter_nick_name as 'promoterNickName',
         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'
+        round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio'
         from kuaishou_supply_chain
         where 1= 1
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
@@ -394,7 +394,7 @@
         promoter_nick_name as 'promoterNickName',
         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'
+        round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio'
         from kuaishou_supply_chain
         where 1= 1
         <if test="start != null and start != ''">