Prechádzať zdrojové kódy

自动收货和自动评价问题处理

evoxwht 2 rokov pred
rodič
commit
7b9d489092

+ 1 - 1
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) {

+ 2 - 2
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([

+ 2 - 2
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([