作者 lyh

gx脚本

@@ -40,12 +40,12 @@ class DownloadProject extends Command @@ -40,12 +40,12 @@ class DownloadProject extends Command
40 protected $description = '导出项目数据'; 40 protected $description = '导出项目数据';
41 41
42 public function handle(){ 42 public function handle(){
43 - ProjectServer::useProject(5);  
44 - echo date('Y-m-d H:i:s') . 'start' . PHP_EOL;  
45 $v6WeekModel = new V6WeeklyReport(); 43 $v6WeekModel = new V6WeeklyReport();
46 - $data = $v6WeekModel->read(['id'=>28058]);  
47 - $data = $this->workChatMessage($data,5);  
48 - DB::disconnect('custom_mysql'); 44 + $lists = $v6WeekModel->list([],'id',['*'],'desc',100);
  45 + echo date('Y-m-d H:i:s') . 'start' . PHP_EOL;
  46 + foreach ($lists as $data){
  47 + $this->workChatMessage($data,$data['project_id']);
  48 + }
49 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 49 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
50 return true; 50 return true;
51 } 51 }
@@ -312,12 +312,12 @@ class DownloadProject extends Command @@ -312,12 +312,12 @@ class DownloadProject extends Command
312 $tomorrowNineAM = date('Y-m-d H:i:s', $timestamp); 312 $tomorrowNineAM = date('Y-m-d H:i:s', $timestamp);
313 $param = [ 313 $param = [
314 'project_id'=>$project_id, 314 'project_id'=>$project_id,
315 - 'friend_id'=>1, 315 + 'friend_id'=>17667,
316 'type'=>MessagePush::TYPE_WEEK, 316 'type'=>MessagePush::TYPE_WEEK,
317 - 'content'=>"【全球搜V6.0周报】"."\n".$content, 317 + 'content'=>"【全球搜V6.0周报】--项目id:$project_id"."\n".$content,
318 'ref_ids'=>'', 318 'ref_ids'=>'',
319 'send_time'=>$tomorrowNineAM, 319 'send_time'=>$tomorrowNineAM,
320 - 'status'=>3, 320 + 'status'=>0,
321 ]; 321 ];
322 //写入一条推送消息 自动消费 322 //写入一条推送消息 自动消费
323 $messagePushModel = new MessagePush(); 323 $messagePushModel = new MessagePush();