12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace App\Console\Commands\CpcAdvertise;
- use App\Modules\Book\Services\SuperiorHistoryBookService;
- use App\Modules\CpcAdvertise\Services\ChannelBillsService;
- use App\Modules\CpcAdvertise\Services\CpcChannelStatsService;
- use DB;
- use Illuminate\Console\Command;
- class CpcBillTasks extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'CpcAdvertise:bill_task';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '广告结算';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return mixed
- */
- public function handle()
- {
- //
- //$date = date('Y-m-d',strtotime('-2 day'));
- for($i=12;$i>=2;$i--){
- $date = date('Y-m-d',strtotime('-'.$i.' day'));
- ChannelBillsService::generate_bills($date);
- }
- }
- }
|