This commit is contained in:
邓皓元 2019-01-23 11:32:24 +08:00
parent 98d69274bd
commit 4fc607f182
6 changed files with 9 additions and 9 deletions

View File

@ -16,7 +16,7 @@ class BlocRepository extends Repository
/** /**
* 是否开启数据转化 * 是否开启数据转化
* *
* @var bool * @var bool
*/ */
protected $needTransform = false; protected $needTransform = false;
@ -59,4 +59,4 @@ class BlocRepository extends Repository
return $this; return $this;
} }
} }

View File

@ -25,8 +25,8 @@ class AddedOrderSync extends Command
public function handle() public function handle()
{ {
$this->datetime = $this->getDateTime(); $this->datetime = $this->getDateTime();
$this->companies = app(CompanyRepository::class)->get()->keyBy('sn'); $this->companies = app(CompanyRepository::class)->withTrashed()->get()->keyBy('sn');
$this->packages = app(PackageRepository::class)->get()->keyBy('sn'); $this->packages = app(PackageRepository::class)->withTrashed()->get()->keyBy('sn');
$orders = $this->getOrders(); $orders = $this->getOrders();
$orderItems = $this->getOrderItems($orders); $orderItems = $this->getOrderItems($orders);

View File

@ -29,8 +29,8 @@ class OrderBaseSync extends Command
public function handle() public function handle()
{ {
$this->companies = app(CompanyRepository::class)->get()->keyBy('sn'); $this->companies = app(CompanyRepository::class)->withTrashed()->get()->keyBy('sn');
$this->packages = app(PackageRepository::class)->get()->keyBy('sn'); $this->packages = app(PackageRepository::class)->withTrashed()->get()->keyBy('sn');
$orders = $this->getOrders(); $orders = $this->getOrders();
$cards = $this->getCards($orders); $cards = $this->getCards($orders);

View File

@ -28,7 +28,7 @@ class PackageSync extends Command
public function handle() public function handle()
{ {
$datetime = $this->getDateTime(); $datetime = $this->getDateTime();
$this->companies = app(CompanyRepository::class)->get()->pluck('sn')->toArray(); $this->companies = app(CompanyRepository::class)->withTrashed()->get()->pluck('sn')->toArray();
$basePackages = $this->getBasePackages(); $basePackages = $this->getBasePackages();

View File

@ -40,7 +40,7 @@ class Command extends BaseCommand
return Carbon::parse($month)->startOfMonth(); return Carbon::parse($month)->startOfMonth();
} }
return Carbon::now()->startOfMonth()->subMonth(); return Carbon::now()->startOfMonth()->subMonth();
} }

View File

@ -17,7 +17,7 @@ class ProductSync extends Command
public function handle() public function handle()
{ {
$packages = app(PackageRepository::class)->where('type', 0)->get()->keyBy('sn')->toArray(); $packages = app(PackageRepository::class)->withTrashed()->where('type', 0)->get()->keyBy('sn')->toArray();
$fields = ['company', 'content', 'order_account']; $fields = ['company', 'content', 'order_account'];