作者 lyh

gx

@@ -40,7 +40,10 @@ class Yesterday extends Command @@ -40,7 +40,10 @@ class Yesterday extends Command
40 $arr['yesterday_pv_num'] = DB::table('gl_customer_visit_item')->whereDate('created_at', $yesterday)->where('domain',$v['test_domain'])->count(); 40 $arr['yesterday_pv_num'] = DB::table('gl_customer_visit_item')->whereDate('created_at', $yesterday)->where('domain',$v['test_domain'])->count();
41 $arr['yesterday_ip_num'] = DB::table('gl_customer_visit')->whereDate('created_at', $yesterday)->where('domain',$v['test_domain'])->count(); 41 $arr['yesterday_ip_num'] = DB::table('gl_customer_visit')->whereDate('created_at', $yesterday)->where('domain',$v['test_domain'])->count();
42 $arr['inquiry_num'] = DB::table('gl_inquiry_set')->whereDate('created_at', $yesterday)->where('project_id',$v['project_id'])->count(); 42 $arr['inquiry_num'] = DB::table('gl_inquiry_set')->whereDate('created_at', $yesterday)->where('project_id',$v['project_id'])->count();
43 - $arr['rank_compliance_num'] = DB::table('rank_compliance_num')->whereDate('created_at', $yesterday)->where('project_id',$v['project_id'])->count(); 43 + $arr['date'] = date('Y-m-d',time());
  44 + $data[] = $arr;
44 } 45 }
  46 + DB::table('gl_yesterday_count')->insert($data);
  47 + echo $this->error;
45 } 48 }
46 } 49 }
@@ -23,6 +23,7 @@ class Kernel extends ConsoleKernel @@ -23,6 +23,7 @@ class Kernel extends ConsoleKernel
23 $schedule->command('rank_data_recomm_domain')->weeklyOn(1, '01:00')->withoutOverlapping(1); // 排名数据-引荐域名,每周一凌晨执行一次 23 $schedule->command('rank_data_recomm_domain')->weeklyOn(1, '01:00')->withoutOverlapping(1); // 排名数据-引荐域名,每周一凌晨执行一次
24 $schedule->command('rank_data_week')->weeklyOn(1, '01:00')->withoutOverlapping(1); // 排名数据,每周一凌晨执行一次 24 $schedule->command('rank_data_week')->weeklyOn(1, '01:00')->withoutOverlapping(1); // 排名数据,每周一凌晨执行一次
25 $schedule->command('share_user')->dailyAt('01:00')->withoutOverlapping(1); // 清除用户ayr_share数据,每天凌晨1点执行一次 25 $schedule->command('share_user')->dailyAt('01:00')->withoutOverlapping(1); // 清除用户ayr_share数据,每天凌晨1点执行一次
  26 + $schedule->command('yesterday_count')->dailyAt('01:00')->withoutOverlapping(1); // 清除用户ayr_share数据,每天凌晨1点执行一次
26 $schedule->command('web_traffic 1')->everyThirtyMinutes(); // 引流 1-3个月的项目,半小时一次 27 $schedule->command('web_traffic 1')->everyThirtyMinutes(); // 引流 1-3个月的项目,半小时一次
27 $schedule->command('web_traffic 2')->cron('*/18 * * * *'); // 引流 4-8个月的项目,18分钟一次 28 $schedule->command('web_traffic 2')->cron('*/18 * * * *'); // 引流 4-8个月的项目,18分钟一次
28 $schedule->command('web_traffic 3')->cron('*/12 * * * *'); // 引流 大于9个月的项目,12分钟一次 29 $schedule->command('web_traffic 3')->cron('*/12 * * * *'); // 引流 大于9个月的项目,12分钟一次
  1 +<?php
  2 +
  3 +namespace App\Http\Controllers\Bside\HomeCount;
  4 +
  5 +use App\Enums\Common\Code;
  6 +use App\Http\Controllers\Bside\BaseController;
  7 +
  8 +class CountController extends BaseController
  9 +{
  10 + /**
  11 + * @name :(昨日统计数据)yesterday_count
  12 + * @author :lyh
  13 + * @method :post
  14 + * @time :2023/5/23 17:23
  15 + */
  16 + public function count(){
  17 + $data = [];
  18 + //TODO::全球搜方案信息
  19 + //TODO::网站访问量统计
  20 + //TODO::关键字排名数据
  21 + //TODO::关键字排名数据
  22 + return $this->response('success',Code::SUCCESS,$data);
  23 + }
  24 +
  25 +
  26 +}
  1 +<?php
  2 +
  3 +namespace App\Http\Logic\Bside\HomeCount;
  4 +
  5 +use App\Http\Logic\Bside\BaseLogic;
  6 +
  7 +class CountLogic extends BaseLogic
  8 +{
  9 + public function __construct()
  10 + {
  11 + parent::__construct();
  12 +
  13 + $this->model = new Yes();
  14 + }
  15 +
  16 + /**
  17 + * @name :(昨日统计数据)yesterday_count
  18 + * @author :lyh
  19 + * @method :post
  20 + * @time :2023/5/23 17:30
  21 + */
  22 + public function yesterday_count(){
  23 + return $this->success();
  24 + }
  25 +}
@@ -23,7 +23,7 @@ class DeptUserLogic extends BaseLogic @@ -23,7 +23,7 @@ class DeptUserLogic extends BaseLogic
23 */ 23 */
24 public function dept_user_save(){ 24 public function dept_user_save(){
25 if(isset($this->param['id']) && !empty($this->param['id'])){ 25 if(isset($this->param['id']) && !empty($this->param['id'])){
26 - $rs = $this->dept_user_edit($this->param); 26 + $rs = $this->dept_user_edit();
27 }else{ 27 }else{
28 $rs = $this->dept_user_add(); 28 $rs = $this->dept_user_add();
29 } 29 }
@@ -60,8 +60,8 @@ class DeptUserLogic extends BaseLogic @@ -60,8 +60,8 @@ class DeptUserLogic extends BaseLogic
60 * @method :post 60 * @method :post
61 * @time :2023/5/17 17:54 61 * @time :2023/5/17 17:54
62 */ 62 */
63 - public function dept_user_edit($param){  
64 - $rs = $this->model->edit($param,['id'=>$this->param['id']]); 63 + public function dept_user_edit(){
  64 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
65 if($rs === false){ 65 if($rs === false){
66 $this->fail('error'); 66 $this->fail('error');
67 } 67 }
  1 +<?php
  2 +
  3 +namespace App\Models\HomeCount;
  4 +
  5 +use App\Models\Base;
  6 +
  7 +class YesterdayCount extends Base
  8 +{
  9 + protected $table = 'gl_yesterday_count';
  10 +}