From 8881fa5494e467da7b10043f19dbb0bb454371ae Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Wed, 25 Sep 2024 17:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=B0=83=E6=95=B4&&=E5=88=86?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E9=97=B4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/admin/controller/IndexController.php | 24 +++++++++---------- service/app/command/SpiderDy.php | 2 +- service/app/command/SpiderMt.php | 2 +- service/app/command/SpiderTc.php | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/service/app/admin/controller/IndexController.php b/service/app/admin/controller/IndexController.php index 230cea80..e80deaad 100644 --- a/service/app/admin/controller/IndexController.php +++ b/service/app/admin/controller/IndexController.php @@ -147,51 +147,51 @@ class IndexController extends base SUM(total_price) as total, COUNT(id) as `all`, SUM(CASE - WHEN (os = 1 AND order_status = 3) OR (os = 2 AND order_status = 4) OR (os = 3 AND order_status = 1) THEN 1 + WHEN (os in(1,7) AND order_status = 3) OR (os = 2 AND order_status = 4) OR (os in (3,5) AND order_status = 1) THEN 1 ELSE 0 END) as tobeused, SUM(CASE - WHEN (os = 1 AND order_status = 3) OR (os = 2 AND order_status = 4) OR (os = 3 AND order_status = 1) THEN total_price + WHEN (os in(1,7) AND order_status = 3) OR (os = 2 AND order_status = 4) OR (os in (3,5) AND order_status = 1) THEN total_price ELSE 0 END) as tobeused_price, SUM(CASE - WHEN (os = 1 AND order_status = 4) OR (os = 3 AND order_status = 2) OR (os = 2 AND order_status = 5) THEN 1 + WHEN (os in(1,7) AND order_status = 4) OR (os in (3,5) AND order_status = 2) OR (os = 2 AND order_status = 5) THEN 1 ELSE 0 END) as asset, SUM(CASE - WHEN (os = 1 AND order_status = 4) OR (os = 3 AND order_status = 2) OR (os = 2 AND order_status = 5) THEN asset_price + WHEN (os in(1,7) AND order_status = 4) OR (os in (3,5) AND order_status = 2) OR (os = 2 AND order_status = 5) THEN asset_price ELSE 0 END) as asset_price, SUM(CASE - WHEN ((os = 1 AND status = 5) OR (os = 3 AND status = 4) OR (os = 2 AND status = 1)) THEN 1 + WHEN ((os in(1,7) AND status = 5) OR (os in (3,5) AND status = 4) OR (os = 2 AND status = 1)) THEN 1 ELSE 0 END) AS refund, SUM(CASE - WHEN ((os = 1 AND status = 5) OR (os = 3 AND status = 4) OR (os = 2 AND status = 1)) THEN actual_price + WHEN ((os in(1,7) AND status = 5) OR (os in (3,5) AND status = 4) OR (os = 2 AND status = 1)) THEN actual_price ELSE 0 END) AS refund_price, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfThirtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfThirtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 ELSE 0 END) AS tobeused_30, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfThirtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfThirtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price ELSE 0 END) AS tobeused_price_30, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfSixtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfSixtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 ELSE 0 END) AS tobeused_60, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfSixtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfSixtyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price ELSE 0 END) AS tobeused_price_60, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfEightyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfEightyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN 1 ELSE 0 END) AS tobeused_80, SUM(CASE - WHEN ((os=1 AND order_status=3) OR (os=2 AND order_status=4) OR (os=3 AND order_status=1)) AND create_at >= ' . $startOfEightyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price + WHEN ((os in(1,7) AND order_status=3) OR (os=2 AND order_status=4) OR (os in (3,5) AND order_status=1)) AND create_at >= ' . $startOfEightyDaysAgoTimestamp . ' AND create_at <= ' . $endOfDayTimestamp . ' THEN total_price ELSE 0 END) AS tobeused_price_80 '); diff --git a/service/app/command/SpiderDy.php b/service/app/command/SpiderDy.php index 6d412827..744bebe3 100644 --- a/service/app/command/SpiderDy.php +++ b/service/app/command/SpiderDy.php @@ -169,7 +169,7 @@ class SpiderDy extends Command // 8点20 开始分配订单 date_default_timezone_set('Asia/Shanghai'); - $startTime = strtotime(date('Y-m-d 08:20')); + $startTime = strtotime(date('Y-m-d 09:10')); if (time() > $startTime) { $start = date('Y-m-d 00:00:00', strtotime("-{$d} days")); $end = date('Y-m-d 23:59:59'); diff --git a/service/app/command/SpiderMt.php b/service/app/command/SpiderMt.php index 39c29de9..86ff11d5 100644 --- a/service/app/command/SpiderMt.php +++ b/service/app/command/SpiderMt.php @@ -183,7 +183,7 @@ class SpiderMt extends Command // } date_default_timezone_set('Asia/Shanghai'); - $startTime = strtotime(date('Y-m-d 08:20')); + $startTime = strtotime(date('Y-m-d 09:10')); if (time() > $startTime) { $start = date('Y-m-d 00:00:00', strtotime("-{$d} days")); $end = date('Y-m-d 23:59:59'); diff --git a/service/app/command/SpiderTc.php b/service/app/command/SpiderTc.php index c57ea902..29985028 100644 --- a/service/app/command/SpiderTc.php +++ b/service/app/command/SpiderTc.php @@ -173,7 +173,7 @@ class SpiderTc extends Command // 8点20 开始分配订单 date_default_timezone_set('Asia/Shanghai'); - $startTime = strtotime(date('Y-m-d 08:20')); + $startTime = strtotime(date('Y-m-d 09:10')); if (time() > $startTime) { $start = date('Y-m-d 00:00:00', strtotime("-{$d} days")); $output->writeln('END spider:tc:start:'.$start);