|
@@ -7,7 +7,8 @@
|
|
|
|
|
|
<select id="getOrderList" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select *
|
|
|
- from (select promoter_id as 'promoterId',
|
|
|
+ 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',
|
|
@@ -15,7 +16,6 @@
|
|
|
sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
|
|
|
round(sum(case when send_status = 1 and order_status != 80 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 != ''">
|
|
@@ -56,6 +56,7 @@
|
|
|
from (select
|
|
|
item_title as 'itemTitle',
|
|
|
item_id as 'itemId',
|
|
|
+ reserve_price as 'reservePrice',
|
|
|
image_url 'imageUrl',
|
|
|
count(oid) as 'orderNum',
|
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
@@ -112,6 +113,7 @@
|
|
|
from (
|
|
|
select
|
|
|
item_id as 'itemId',
|
|
|
+ reserve_price as 'reservePrice',
|
|
|
item_title as 'itemTitle',
|
|
|
image_url as 'imageUrl',
|
|
|
count(oid) as 'orderNum',
|
|
@@ -137,7 +139,8 @@
|
|
|
group by item_id) t
|
|
|
order by t.orderNum desc
|
|
|
</select>
|
|
|
- <select id="getTopAnchors" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+
|
|
|
+ <select id="getTopPromoterByItemId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select
|
|
|
*
|
|
|
from
|
|
@@ -155,6 +158,7 @@
|
|
|
group by promoter_id) t
|
|
|
order by t.orderNum desc limit 3
|
|
|
</select>
|
|
|
+
|
|
|
<select id="itemDetail" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select *
|
|
|
from (
|
|
@@ -507,4 +511,5 @@
|
|
|
group by item_id,promoter_id) t
|
|
|
order by t.itemId,t.orderNum desc
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|