Browse Source

ccr信息

yumeng 1 year ago
parent
commit
48527c3ede

+ 2 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -329,10 +329,11 @@ public class SupplyChainController extends BaseController {
                 export.add(date.getString("deliveryNum"));
                 export.add(date.getString("deliveryRadio"));
                 export.add(date.getString("notDeliveryNum"));
+                export.add(date.getString("ccrValue"));
                 exportList.add(export);
             }
         }
-        String[] headers = {"所属人", "商品ID", "商品名称", "商品封面", "佣金率", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "未发货数"};
+        String[] headers = {"所属人", "商品ID", "商品名称", "商品封面", "佣金率", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "未发货数", "ccr"};
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
         XSSFWorkbook workbook = new XSSFWorkbook();

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

@@ -187,10 +187,13 @@
         sum(case when t1.send_status = 0 and t1.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         round(sum(case when t1.send_status = 1 and t1.order_status != 80 then 1 else 0 end) / sum(case when
         send_status = 1 then 1 else 0 end), 4) as 'deliveryRadio',
-        t1.item_commission_rate as 'itemCommissionRate'
+        t1.item_commission_rate as 'itemCommissionRate',
+        t3.ccr_value as 'ccrValue'
         from kuaishou_supply_chain t1
         left join kuaishou_item_bind_user t2
         on t1.item_id = t2.item_id
+        left join kuaishou_item_ccr_info t3
+        on t1.item_id = t3.item_id
         where 1 = 1
         <if test="start != null and start != ''">
             and t1.order_create_time &gt;= #{start}
@@ -214,7 +217,7 @@
 
 
     <select id="itemBindList" resultType="com.alibaba.fastjson.JSONObject">
-        select *
+        select *,t3.ccr_value as 'ccrValue'
         from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
         from kuaishou_item_list
         where
@@ -248,6 +251,7 @@
         from kuaishou_supply_chain t1
         where order_create_time &gt;= #{start}
         group by item_id) t2 on t1.itemId = t2.itemId
+        left join kuaishou_item_ccr_info t3 on t1.itemId = t3.item_id
         where 1 = 1
         <if test="itemId != null and itemId != ''">
             and t1.itemId = #{itemId}
@@ -834,10 +838,13 @@
         sum(case when t1.send_status = 0 and t1.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         round(sum(case when t1.send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when t1.order_status
         != 80 then 1 else 0 end) * 100, 2) as 'deliveryRadio',
-        round(t1.item_commission_rate / 10,2) as 'itemCommissionRate'
+        round(t1.item_commission_rate / 10,2) as 'itemCommissionRate',
+        t3.ccr_value as 'ccrValue'
         from kuaishou_supply_chain t1
         left join kuaishou_item_bind_user t2
         on t1.item_id = t2.item_id
+        left join kuaishou_item_ccr_info t3
+        on t1.item_id = t3.item_id
         where 1 = 1
         <if test="start != null and start != ''">
             and t1.order_create_time &gt;= #{start}
@@ -2472,7 +2479,7 @@
 
     </select>
     <select id="exportBindOrder" resultType="com.alibaba.fastjson.JSONObject">
-        select *
+        select *,t3.ccr_value as 'ccrValue'
         from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
         from kuaishou_item_list
         where
@@ -2496,6 +2503,8 @@
         from kuaishou_supply_chain
         where order_create_time &gt;= #{start}
         group by item_id) t2 on t1.itemId = t2.itemId
+        left join kuaishou_item_ccr_info t3
+        on t1.itemId = t3.item_id
         where 1 = 1
         <if test="itemId != null and itemId != ''">
             and t1.item_id = #{itemId}