diff --git a/app/Business/UpstreamBusinessInformation.php b/app/Business/UpstreamBusinessInformation.php index 70383efd..837dc4a3 100644 --- a/app/Business/UpstreamBusinessInformation.php +++ b/app/Business/UpstreamBusinessInformation.php @@ -262,7 +262,10 @@ SQL); $page, $perPage, $filters, - $this->storesWithAccountOwnership($this->mirror->allStores($storeFilters)), + $this->storesWithAccountOwnership(array_map( + fn (array $row): array => $this->mapStore($row), + $this->mirror->allStores($storeFilters), + )), ); } diff --git a/tests/Unit/EcommerceFinance/UpstreamBusinessInformationTest.php b/tests/Unit/EcommerceFinance/UpstreamBusinessInformationTest.php index 19879193..777a3eab 100644 --- a/tests/Unit/EcommerceFinance/UpstreamBusinessInformationTest.php +++ b/tests/Unit/EcommerceFinance/UpstreamBusinessInformationTest.php @@ -158,6 +158,7 @@ class UpstreamBusinessInformationTest extends TestCase $this->assertSame('正确店铺负责人', $paginator->items()[0]->store_manager); $this->assertSame('正确部门负责人', $paginator->items()[0]->department_manager); $this->assertNotSame('运营总监', $paginator->items()[0]->department_manager); + $this->assertSame('正常', $paginator->items()[0]->store_status); $summaryCards = collect($this->app['request']->attributes->get('business-page-summary-cards'))->keyBy('label'); $this->assertSame(1, $summaryCards['店铺总数']['value']); $this->assertSame(1, $summaryCards['正常店铺']['value']);