From 7b9d489092f2087555b7760c1bb90a660c53299a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 1 Apr 2023 10:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=94=B6=E8=B4=A7=E5=92=8C?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=AF=84=E4=BB=B7=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/activity/live/LiveRoomServices.php | 2 +- crmeb/app/services/order/StoreOrderServices.php | 4 ++-- crmeb/app/services/order/StoreOrderTakeServices.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crmeb/app/services/activity/live/LiveRoomServices.php b/crmeb/app/services/activity/live/LiveRoomServices.php index a5f03b14a..64c23ce29 100644 --- a/crmeb/app/services/activity/live/LiveRoomServices.php +++ b/crmeb/app/services/activity/live/LiveRoomServices.php @@ -242,6 +242,7 @@ class LiveRoomServices extends BaseServices /** * 同步直播间状态 * @return bool + * @throws \Exception */ public function syncRoomStatus() { @@ -249,7 +250,6 @@ class LiveRoomServices extends BaseServices $limit = 50; $data = $dataAll = []; $rooms = $this->dao->getColumn([], 'id,room_id,live_status', 'room_id'); -// if (!$rooms) return true; do { $wxRooms = MiniProgramService::getLiveInfo($start, $limit); foreach ($wxRooms as $room) { diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php index 2872f002c..57e91fb2e 100644 --- a/crmeb/app/services/order/StoreOrderServices.php +++ b/crmeb/app/services/order/StoreOrderServices.php @@ -2566,12 +2566,12 @@ HTML; public function autoComment() { //自动评价天数 - $systemCommentTime = (int)sys_config('system_comment_time', 0); + $systemCommentTime = sys_config('system_comment_time', 0); //0为取消自动默认好评功能 if ($systemCommentTime == 0) { return true; } - $sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemCommentTime . ' day'))); + $sevenDay = bcsub((string)time(), bcmul((string)$systemCommentTime, '86400')); /** @var StoreOrderStoreOrderStatusServices $service */ $service = app()->make(StoreOrderStoreOrderStatusServices::class); $orderList = $service->getTakeOrderIds([ diff --git a/crmeb/app/services/order/StoreOrderTakeServices.php b/crmeb/app/services/order/StoreOrderTakeServices.php index 7e98b8060..e16fc003a 100644 --- a/crmeb/app/services/order/StoreOrderTakeServices.php +++ b/crmeb/app/services/order/StoreOrderTakeServices.php @@ -522,12 +522,12 @@ class StoreOrderTakeServices extends BaseServices public function autoTakeOrder() { //7天前时间戳 - $systemDeliveryTime = (int)sys_config('system_delivery_time', 0); + $systemDeliveryTime = sys_config('system_delivery_time', 0); //0为取消自动收货功能 if ($systemDeliveryTime == 0) { return true; } - $sevenDay = strtotime(date('Y-m-d H:i:s', strtotime('-' . $systemDeliveryTime . ' day'))); + $sevenDay = bcsub((string)time(), bcmul((string)$systemDeliveryTime, '86400')); /** @var StoreOrderStoreOrderStatusServices $service */ $service = app()->make(StoreOrderStoreOrderStatusServices::class); $orderList = $service->getTakeOrderIds([