diff --git a/application/common/command/CheckSmsPlantCommand.php b/application/common/command/CheckSmsPlantCommand.php index d24d433..2549e10 100644 --- a/application/common/command/CheckSmsPlantCommand.php +++ b/application/common/command/CheckSmsPlantCommand.php @@ -3,12 +3,7 @@ namespace app\common\command; use app\admin\controller\SendMailLogic; -use app\admin\model\Message; use app\admin\model\OrderDispatch; -use app\admin\model\OrderDispatchRecord; - -use app\admin\model\TtsLog; -use app\common\Logic\NoticeLogic; use think\console\Command; use think\console\Input; use think\console\Output; @@ -25,29 +20,13 @@ class CheckSmsPlantCommand extends Command $Model = new OrderDispatch(); $now = date('Y-m-d H:i:s'); //两小时通知 $afterTwoHours = date('Y-m-d H:i:s', strtotime('+2 hours')); - - - $logic = new SendMailLogic(); - //$Model->where('need_notice',1) $Model->where('status','=',OrderDispatch::STATUS_PLANIT) ->where('plan_time','between',[$now,$afterTwoHours]) ->where('notice_num','<',3) - ->chunk(100, function ($list)use ($logic) { + ->chunk(100, function ($list){ $ids = []; - $logs = []; foreach ($list as $item) { $ids[] = $item->id; - //修改状态 - /* $logs[] = [ - 'dispatch_id' => $item->id, - 'order_id'=>$item->order_id, - 'type' => 2, - 'outid' => md5(time().rand(1000,9999).rand(1000,9999)), - 'create_time' => date('Y-m-d H:i:s'), - 'status' => 0, - 'update_time' => date('Y-m-d H:i:s') - ]; - (new TtsLog())->insertAll($logs);*/ SendMailLogic::sendToWorker($item->worker_tel); } if(!empty($ids)){