- 聚水潭奇门客户端与发货同步器骨架:QimenClient(签名+POST)、ShippingDataSynchronizer(erp.sctrade.query 列表 + erp.sradesku.query 明细 + upsert + modified 水位) - 发货明细扁平展示表 jst_oms_shipping(对齐工作平台发货数据 47 列/顺序,用于快递运费核算);原始表 jst_sctrade/_items/_skus/_receiver + jst_sync_state - 快递应付新增「发货数据」页:Pages.contentForShippingData + 视图 + business_navigation 导航项(slug=shipping-data) - ShippingOrderRepository 读展示表;artisan jushuitan:sync-shipping + 每10分钟增量调度(JST_SYNC_ENABLED 默认关) - 落库连接 jushuitan_local(本地容器,env 可覆盖);演示 Seeder(6 条家具发货样例);.env.jushuitan.example Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014nvGZkg27YMEdhRy6EiUwf
47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Modules\EcommerceFinance\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider as Provider;
|
|
use Modules\EcommerceFinance\Console\SyncJushuitanShipping;
|
|
use Modules\EcommerceFinance\Services\JianSunSnapshotRefresher;
|
|
use Modules\EcommerceFinance\Services\OperationsReplicaSnapshotRefresher;
|
|
use Modules\EcommerceFinance\Services\UpstreamSnapshotRefresherRegistry;
|
|
use Modules\EcommerceFinance\Services\UpstreamSourceRegistry;
|
|
|
|
class Main extends Provider
|
|
{
|
|
public function boot(): void
|
|
{
|
|
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'ecommerce-finance');
|
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
|
|
|
if ($this->app->runningInConsole()) {
|
|
$this->commands([
|
|
SyncJushuitanShipping::class,
|
|
]);
|
|
}
|
|
}
|
|
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(UpstreamSnapshotRefresherRegistry::class, function ($app) {
|
|
$registry = new UpstreamSnapshotRefresherRegistry(
|
|
$app->make(UpstreamSourceRegistry::class)
|
|
);
|
|
$registry->register('jiansun', fn () => $app->make(JianSunSnapshotRefresher::class));
|
|
$registry->register('operations_replica', fn () => $app->make(OperationsReplicaSnapshotRefresher::class));
|
|
|
|
return $registry;
|
|
});
|
|
|
|
if (app()->routesAreCached()) {
|
|
return;
|
|
}
|
|
|
|
foreach (['admin.php', 'api.php'] as $route) {
|
|
$this->loadRoutesFrom(__DIR__ . '/../Routes/' . $route);
|
|
}
|
|
}
|
|
}
|