69 lines
1.6 KiB
PHP
69 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Events\StockUpdateEvent;
|
|
use App\Exports\DiffTodayPriceGoodsExport;
|
|
use App\Models\BusinessGoodsSku;
|
|
use App\Models\BusinessOrder;
|
|
use App\Models\GoodsSku;
|
|
use App\Models\GoodsType;
|
|
use App\Models\Log;
|
|
use App\Models\Shop;
|
|
use App\Models\TodayPrice;
|
|
use App\Services\Business\BusinessFactory;
|
|
use App\Services\Business\KuaiTuanTuan\FaceSheet;
|
|
use App\Utils\DateTimeUtils;
|
|
use Illuminate\Console\Command;
|
|
use Illuminate\Support\Facades\DB;
|
|
use App\Jobs\BusinessGoodsSkuIncrQuantity;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Maatwebsite\Excel\Facades\Excel;
|
|
|
|
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 = '测试';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle()
|
|
{
|
|
$shops = Shop::query()->where('plat_id', Shop::$PLAT_KTT)->where('status', Shop::$STATUS_AUTHORIZED)->where('id', 6)->get();
|
|
foreach ($shops as $shop) {
|
|
$faceSheet = new FaceSheet();
|
|
$faceSheet->setShop($shop);
|
|
var_dump($faceSheet->searchWayBill());
|
|
}
|
|
}
|
|
|
|
public function getAuthUrl()
|
|
{
|
|
return "https://wb.pinduoduo.com/logistics/auth?client_id=24f25877aca447c5830a6aa896301d5e&redirect_uri=http://erp.chutang66.com/pdd/ship";
|
|
}
|
|
}
|