作者 lyh

gx脚本

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