Просмотр исходного кода

Revert "[智价云] 统计更新"

This reverts commit 8cff8675de233a18d3a1240574edac2cf23baa0a.
tangyuanwang 8 часов назад
Родитель
Сommit
b5a8d4af25
1 измененных файлов с 1 добавлено и 9 удалено
  1. 1 9
      app/Jobs/Manager/Process/SubNoticeJobs.php

+ 1 - 9
app/Jobs/Manager/Process/SubNoticeJobs.php

@@ -51,7 +51,7 @@ class SubNoticeJobs implements ShouldQueue
     public function handle()
     {
         try {
-            $notice_config_data = $this->get_statistics_time_rule(1);
+            $notice_config_data = $this->get_statistics_time_rule($this->message_data['company_id']);
             if ($notice_config_data['statistics_start_time'] == '' || $notice_config_data['statistics_end_time'] == '' || $notice_config_data['statistics_day'] == 0) {
                 //记录日志
                 // Log::info('job_info', '订阅未设置,不进行推送', ['data' => $this->message_data, 'notice_config_data' => $notice_config_data]);
@@ -80,8 +80,6 @@ class SubNoticeJobs implements ShouldQueue
                     $number1 = isset($this->user_data[$key]['lowprice_product_logids']) ? count($this->user_data[$key]['lowprice_product_logids']) : 0;
                     $number2 = isset($this->user_data[$key]['violation_product_logids']) ? count($this->user_data[$key]['violation_product_logids']) : 0;
                     $number3 = isset($this->user_data[$key]['violation_store_logids']) ? count($this->user_data[$key]['violation_store_logids']) : 0;
-
-                    dd($number1);
                     //统计总条数
                     $totle_number = $number1 + $number2 + $number3;
                     $sms_config_data =[];
@@ -132,7 +130,6 @@ class SubNoticeJobs implements ShouldQueue
                 }
             }
         } catch (\Exception $e) {
-            print_r($e->getMessage());exit;
             Log::info('job_error', '订阅短信通知推送队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
         }
     }
@@ -252,7 +249,6 @@ class SubNoticeJobs implements ShouldQueue
         $todayStart = strtotime($statistics_start_time); // 统计开始时间
         $todayEnd = strtotime($statistics_end_time); // 统计结束时间
         $lowprice_ids = $LowPriceGoodsModel->where([['insert_time', '>=', $todayStart], ['insert_time', '<=', $todayEnd], ['company_id', '=', $company_id]])->pluck('id')->toArray();
-        dd(count($lowprice_ids));
         if (empty($lowprice_ids)) return true;
         //获取开启了通知服务的用户
         $usert_list = $LowPriceGoodsMemberModel
@@ -260,7 +256,6 @@ class SubNoticeJobs implements ShouldQueue
             ->join('personnel_employee', 'process_lowprice_product_member.employee_id', '=', 'personnel_employee.id')
             ->where('personnel_employee.open_notice', 0)
             ->where('personnel_employee.company_id', $company_id)
-            ->group(['lowprice_product_logid'])
             ->select(['process_lowprice_product_member.*', 'personnel_employee.mobile', 'personnel_employee.email'])
             ->get()->toArray();
         if (empty($usert_list)) return true;
@@ -276,7 +271,6 @@ class SubNoticeJobs implements ShouldQueue
                 $this->user_data[$user_id]['lowprice_product_logids'][] = $value['lowprice_product_logid'];
             }
         }
-        
         return true;
     }
 
@@ -301,7 +295,6 @@ class SubNoticeJobs implements ShouldQueue
             ->join('personnel_employee', 'process_violation_product_member.employee_id', '=', 'personnel_employee.id')
             ->where('personnel_employee.open_notice', 0)
             ->where('personnel_employee.company_id', $company_id)
-            ->group(['violation_product_logid'])
             ->select(['process_violation_product_member.*', 'personnel_employee.mobile', 'personnel_employee.email'])
             ->get()->toArray();
         if (empty($usert_list)) return true;
@@ -341,7 +334,6 @@ class SubNoticeJobs implements ShouldQueue
             ->join('personnel_employee', 'process_violation_store_member.employee_id', '=', 'personnel_employee.id')
             ->where('personnel_employee.open_notice', 0)
             ->where('personnel_employee.company_id', $company_id)
-            ->group(['violation_store_logid'])
             ->select(['process_lowprice_product_member.*', 'personnel_employee.mobile', 'personnel_employee.email'])
             ->get()->toArray();
         if (empty($usert_list)) return true;