wngur6076 3 月之前
父節點
當前提交
b1d50707b4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql

+ 2 - 2
function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql

@@ -52,7 +52,7 @@ FROM (
     SUM(sorder_qty) as sum_sorder_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-    WHERE _where AND sorder_date >= previous_month_start_date and sorder_date <= previous_month_end_date
+    WHERE true  and reward_date between '20240801' and '20240831' AND sorder_date >= previous_month_start_date and sorder_date <= previous_month_end_date
     GROUP BY seller_id, item_id
     ) as june_data ON mc.id = june_data.seller_id AND md.id = june_data.item_id
     LEFT JOIN (
@@ -62,7 +62,7 @@ FROM (
     SUM(CASE WHEN mx.status = 'C' THEN sorder_qty ELSE 0 END) AS sum_sorder_claim_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-    WHERE  _where AND  sorder_date >= start_date and sorder_date <= end_date
+    WHERE  true  and reward_date between '20240801' and '20240831' AND  sorder_date >= start_date and sorder_date <= end_date
     GROUP BY seller_id, item_id
     ) as july_data ON mc.id = july_data.seller_id AND md.id = july_data.item_id
     WHERE me.cgroup_code = 'A-0001'