作者 lyh

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

@@ -20,7 +20,8 @@ use App\Models\HomeCount\Count; @@ -20,7 +20,8 @@ use App\Models\HomeCount\Count;
20 20
21 class CountAll extends Command 21 class CountAll extends Command
22 { 22 {
23 - 23 + const STATUS_ERROR = 400;
  24 + public $error = 0;
24 /** 25 /**
25 * The name and signature of the console command. 26 * The name and signature of the console command.
26 * 27 *
@@ -77,9 +77,7 @@ class MonthAllCount extends Command @@ -77,9 +77,7 @@ class MonthAllCount extends Command
77 ->groupBy('month')->get()->toArray(); 77 ->groupBy('month')->get()->toArray();
78 foreach ($list as $k=>$v){ 78 foreach ($list as $k=>$v){
79 $v = (array)$v; 79 $v = (array)$v;
80 - if($v['month'] == date('Y-m')){  
81 - continue;  
82 - } 80 + $arr = [];
83 $monthCountModel = new MonthCount(); 81 $monthCountModel = new MonthCount();
84 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); 82 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
85 // 获取当月开始时间 83 // 获取当月开始时间
@@ -88,7 +86,7 @@ class MonthAllCount extends Command @@ -88,7 +86,7 @@ class MonthAllCount extends Command
88 $end = date('Y-m-t', strtotime($v['month'])); 86 $end = date('Y-m-t', strtotime($v['month']));
89 $arr['project_id'] = $project_id; 87 $arr['project_id'] = $project_id;
90 $res = $this->inquiry($url,$v['month']); 88 $res = $this->inquiry($url,$v['month']);
91 - $arr['total'] = 0; 89 +
92 if(isset($res['data']['count'])){ 90 if(isset($res['data']['count'])){
93 echo date('Y-m-d H:i:s') . '数据:'.$res['data']['count'] . PHP_EOL; 91 echo date('Y-m-d H:i:s') . '数据:'.$res['data']['count'] . PHP_EOL;
94 $arr['month_total'] = $res['data']['count']; 92 $arr['month_total'] = $res['data']['count'];
@@ -99,6 +99,7 @@ class MonthCount extends Command @@ -99,6 +99,7 @@ class MonthCount extends Command
99 * @time :2024/1/8 9:05 99 * @time :2024/1/8 9:05
100 */ 100 */
101 public function count($project_id,$url){ 101 public function count($project_id,$url){
  102 + $arr = [];
102 $v = ['month'=>date('Y-m')]; 103 $v = ['month'=>date('Y-m')];
103 $monthCountModel = new MonthCountModel(); 104 $monthCountModel = new MonthCountModel();
104 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); 105 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
@@ -65,10 +65,8 @@ class MonthProjectCount extends Command @@ -65,10 +65,8 @@ class MonthProjectCount extends Command
65 ->select(DB::raw('DATE_FORMAT(updated_date, "%Y-%m") as month')) 65 ->select(DB::raw('DATE_FORMAT(updated_date, "%Y-%m") as month'))
66 ->groupBy('month')->get()->toArray(); 66 ->groupBy('month')->get()->toArray();
67 foreach ($list as $k=>$v){ 67 foreach ($list as $k=>$v){
  68 + $arr = [];
68 $v = (array)$v; 69 $v = (array)$v;
69 -// if($v['month'] == date('Y-m')){  
70 -// continue;  
71 -// }  
72 $monthCountModel = new MonthCount(); 70 $monthCountModel = new MonthCount();
73 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); 71 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
74 // 获取当月开始时间 72 // 获取当月开始时间
@@ -23,7 +23,7 @@ class UpdateKeyword extends Command @@ -23,7 +23,7 @@ class UpdateKeyword extends Command
23 * 23 *
24 * @var string 24 * @var string
25 */ 25 */
26 - protected $signature = 'update_keyword'; 26 + protected $signature = 'update_keyword_content';
27 27
28 /** 28 /**
29 * The console command description. 29 * The console command description.
@@ -51,6 +51,7 @@ class UpdateKeyword extends Command @@ -51,6 +51,7 @@ class UpdateKeyword extends Command
51 if($domainInfo !== false){ 51 if($domainInfo !== false){
52 $this->curlDelRoute($domainInfo['domain'],$v['project_id']); 52 $this->curlDelRoute($domainInfo['domain'],$v['project_id']);
53 } 53 }
  54 + $keywordPageModel->edit(['status'=>1],['id'=>$v['id']]);
54 } 55 }
55 sleep(10); 56 sleep(10);
56 } 57 }
@@ -71,7 +72,7 @@ class UpdateKeyword extends Command @@ -71,7 +72,7 @@ class UpdateKeyword extends Command
71 if(empty($text)){ 72 if(empty($text)){
72 return false; 73 return false;
73 } 74 }
74 - $number = count($info['text']); 75 + $number = count($text);
75 $randomNumber = rand(0, $number - 1); 76 $randomNumber = rand(0, $number - 1);
76 if($updateObject['type'] == 0){//更新所有关键字 77 if($updateObject['type'] == 0){//更新所有关键字
77 $keywordModel->edit(['keyword_content'=>$text[$randomNumber]],['status'=>1]); 78 $keywordModel->edit(['keyword_content'=>$text[$randomNumber]],['status'=>1]);
@@ -48,8 +48,8 @@ class Kernel extends ConsoleKernel @@ -48,8 +48,8 @@ class Kernel extends ConsoleKernel
48 $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次 48 $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次
49 $schedule->command('update_keyword_route')->dailyAt('01:00')->withoutOverlapping(1); //升级项目--清除路由相同的关键字 49 $schedule->command('update_keyword_route')->dailyAt('01:00')->withoutOverlapping(1); //升级项目--清除路由相同的关键字
50 $schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商 50 $schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商
51 - // 每日推送视频任务  
52 - $schedule->command('update_keyword')->hourly()->withoutOverlapping(1); 51 +
  52 + $schedule->command('update_keyword_content')->hourly()->withoutOverlapping(1);
53 // 每日推送视频任务 53 // 每日推送视频任务
54 $schedule->command('video_task')->hourly()->withoutOverlapping(1); 54 $schedule->command('video_task')->hourly()->withoutOverlapping(1);
55 // 每日推送已完成视频任务项目生成对应界面 55 // 每日推送已完成视频任务项目生成对应界面
@@ -124,11 +124,11 @@ class ATemplateLogic extends BaseLogic @@ -124,11 +124,11 @@ class ATemplateLogic extends BaseLogic
124 if(!empty($info['image'])){ 124 if(!empty($info['image'])){
125 $info['image_link'] = getImageUrl($info['image']); 125 $info['image_link'] = getImageUrl($info['image']);
126 } 126 }
127 - if(!empty($info['design_manager'])){  
128 - $info['design_manager'] = (new Manage())->getName($info['design_manager']); 127 + if(!empty($info['design_msg'])){
  128 + $info['design_msg'] = json_decode($info['design_msg']);
129 } 129 }
130 - if(!empty($info['front_manager'])){  
131 - $info['front_manager'] = (new Manage())->getName($info['front_manager']); 130 + if(!empty($info['front_msg'])){
  131 + $info['front_msg'] = json_decode($info['front_msg']);
132 } 132 }
133 return $this->success($info); 133 return $this->success($info);
134 } 134 }
@@ -261,15 +261,11 @@ class ATemplateLogic extends BaseLogic @@ -261,15 +261,11 @@ class ATemplateLogic extends BaseLogic
261 */ 261 */
262 public function auditingStatus(){ 262 public function auditingStatus(){
263 //获取当前数据详情 263 //获取当前数据详情
264 - $info = $this->model->read(['id'=>$this->param['id']]);  
265 - if(isset($this->param['front_status']) && $this->param['front_status'] == 1){  
266 - if($info['design_status'] == 0){  
267 - $this->fail('请先提交设计审核');  
268 - }  
269 - $this->param['design_manager'] = $this->manager['id'];  
270 - $this->param['test_model'] = 0;  
271 - }else{  
272 - $this->param['front_manager'] = $this->manager['id']; 264 + if(isset($this->param['design_msg']) && !empty($this->param['design_msg'])){
  265 + $this->param['design_msg'] = json_decode($this->param['design_msg']);
  266 + }
  267 + if(isset($this->param['front_msg']) && !empty($this->param['front_msg'])){
  268 + $this->param['front_msg'] = json_decode($this->param['front_msg']);
273 } 269 }
274 $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); 270 $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
275 if($rs === false){ 271 if($rs === false){