disableQueryLog(); parent::__construct(); } public function handle() { try{ # 查询已开启回传配置的账号列表 $confList = OfficialWebUserActionSetId::query()->get(); foreach($confList as $conf) { $amountSetVale = json_decode($conf->amount_setvale, 1); if(empty($amountSetVale)) { continue; } foreach($amountSetVale as $setvale) { $newAmountSetVale = []; if(!isset($setvale['miss_setvale']) || !isset($setvale['miss_value'])) { continue; } switch($setvale['type']) { case 1: case 2: $newAmountSetVale[] = [ 'start_amount' => $setvale['start_amount'], 'end_amount' => $setvale['end_amount'], 'type' => $setvale['type'], 'hour_setvale' => [], ]; break; case 3: $newAmountSetVale[] = [ 'start_amount' => $setvale['start_amount'], 'end_amount' => $setvale['end_amount'], 'type' => $setvale['type'], 'hour_setvale' => [ [ 'start_time' => '00:00', 'end_time' => '23:59', 'return_type'=> 3, 'miss_setvale'=>$setvale['miss_setvale'], 'miss_value' => $setvale['miss_value'] ] ] ]; break; } PitcherService::setAdqAccountReportRule([$conf->account_id], $conf->report_type, $conf->enable, $conf->purchase_enable, $conf->miss_enable, $conf->miss_setvale, $conf->sys_group_id, $conf->miss_value , 0, $conf->amount_enable, $newAmountSetVale, $conf->reset_enable, $conf->reset_setvale); } } } catch (\Exception $e) { $this->error('file:'.$e->getFile().' # line:'.$e->getLine().' # message:'.$e->getMessage()); Log::logError('处理历史账号回传配置异常', [ 'file' => $e->getFile(), 'line' => $e->getLine(), 'message'=>$e->getMessage(), 'trace'=> $e->getTraceAsString() ], 'RepairReportDataError'); } } }