作者 lyh

Merge branch 'master-server' of http://47.244.231.31:8099/zhl/globalso-v6

... ... @@ -20,7 +20,8 @@ use App\Models\HomeCount\Count;
class CountAll extends Command
{
const STATUS_ERROR = 400;
public $error = 0;
/**
* The name and signature of the console command.
*
... ...
... ... @@ -77,9 +77,7 @@ class MonthAllCount extends Command
->groupBy('month')->get()->toArray();
foreach ($list as $k=>$v){
$v = (array)$v;
if($v['month'] == date('Y-m')){
continue;
}
$arr = [];
$monthCountModel = new MonthCount();
$info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
// 获取当月开始时间
... ... @@ -88,7 +86,7 @@ class MonthAllCount extends Command
$end = date('Y-m-t', strtotime($v['month']));
$arr['project_id'] = $project_id;
$res = $this->inquiry($url,$v['month']);
$arr['total'] = 0;
if(isset($res['data']['count'])){
echo date('Y-m-d H:i:s') . '数据:'.$res['data']['count'] . PHP_EOL;
$arr['month_total'] = $res['data']['count'];
... ...
... ... @@ -99,6 +99,7 @@ class MonthCount extends Command
* @time :2024/1/8 9:05
*/
public function count($project_id,$url){
$arr = [];
$v = ['month'=>date('Y-m')];
$monthCountModel = new MonthCountModel();
$info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
... ...
... ... @@ -65,10 +65,8 @@ class MonthProjectCount extends Command
->select(DB::raw('DATE_FORMAT(updated_date, "%Y-%m") as month'))
->groupBy('month')->get()->toArray();
foreach ($list as $k=>$v){
$arr = [];
$v = (array)$v;
// if($v['month'] == date('Y-m')){
// continue;
// }
$monthCountModel = new MonthCount();
$info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
// 获取当月开始时间
... ...
... ... @@ -23,7 +23,7 @@ class UpdateKeyword extends Command
*
* @var string
*/
protected $signature = 'update_keyword';
protected $signature = 'update_keyword_content';
/**
* The console command description.
... ... @@ -51,6 +51,7 @@ class UpdateKeyword extends Command
if($domainInfo !== false){
$this->curlDelRoute($domainInfo['domain'],$v['project_id']);
}
$keywordPageModel->edit(['status'=>1],['id'=>$v['id']]);
}
sleep(10);
}
... ... @@ -71,7 +72,7 @@ class UpdateKeyword extends Command
if(empty($text)){
return false;
}
$number = count($info['text']);
$number = count($text);
$randomNumber = rand(0, $number - 1);
if($updateObject['type'] == 0){//更新所有关键字
$keywordModel->edit(['keyword_content'=>$text[$randomNumber]],['status'=>1]);
... ...
... ... @@ -48,8 +48,8 @@ class Kernel extends ConsoleKernel
$schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次
$schedule->command('update_keyword_route')->dailyAt('01:00')->withoutOverlapping(1); //升级项目--清除路由相同的关键字
$schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商
// 每日推送视频任务
$schedule->command('update_keyword')->hourly()->withoutOverlapping(1);
$schedule->command('update_keyword_content')->hourly()->withoutOverlapping(1);
// 每日推送视频任务
$schedule->command('video_task')->hourly()->withoutOverlapping(1);
// 每日推送已完成视频任务项目生成对应界面
... ...
... ... @@ -124,11 +124,11 @@ class ATemplateLogic extends BaseLogic
if(!empty($info['image'])){
$info['image_link'] = getImageUrl($info['image']);
}
if(!empty($info['design_manager'])){
$info['design_manager'] = (new Manage())->getName($info['design_manager']);
if(!empty($info['design_msg'])){
$info['design_msg'] = json_decode($info['design_msg']);
}
if(!empty($info['front_manager'])){
$info['front_manager'] = (new Manage())->getName($info['front_manager']);
if(!empty($info['front_msg'])){
$info['front_msg'] = json_decode($info['front_msg']);
}
return $this->success($info);
}
... ... @@ -261,15 +261,11 @@ class ATemplateLogic extends BaseLogic
*/
public function auditingStatus(){
//获取当前数据详情
$info = $this->model->read(['id'=>$this->param['id']]);
if(isset($this->param['front_status']) && $this->param['front_status'] == 1){
if($info['design_status'] == 0){
$this->fail('请先提交设计审核');
if(isset($this->param['design_msg']) && !empty($this->param['design_msg'])){
$this->param['design_msg'] = json_decode($this->param['design_msg']);
}
$this->param['design_manager'] = $this->manager['id'];
$this->param['test_model'] = 0;
}else{
$this->param['front_manager'] = $this->manager['id'];
if(isset($this->param['front_msg']) && !empty($this->param['front_msg'])){
$this->param['front_msg'] = json_decode($this->param['front_msg']);
}
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
if($rs === false){
... ...