| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Console\Commands;
- use App\Models\ShopPrinter;
- use App\Servers\JobServer;
- use App\Servers\printer\PrinterServer;
- use Carbon\Carbon;
- use Illuminate\Console\Command;
- class Test extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'test';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = 'Command description';
- /**
- * Create a new command instance.
- *
- * @return void
- */
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * Execute the console command.
- *
- * @return int
- */
- public function handle()
- {
- // $printer = ShopPrinter::where('shop_id',111)->where('is_del',0)->get();
- // foreach ($printer as $value){
- // $res = PrinterServer::creatServer()->sendPrints($value->{'brand_id'},$value->{'sn'},1);
- // var_dump($res);
- // }
- // dd(111);
- // 投递打印消息
- JobServer::creatServer()->shopOrderPrintJob(1,111);
- return 0;
- }
- }
|