diff --git a/config/business_navigation.php b/config/business_navigation.php index 5663fc9a..91836de0 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -254,7 +254,7 @@ return [ ['name' => 'account_type', 'label' => '账号类型'], ['name' => 'account', 'label' => '账号'], ['name' => 'password_configured', 'label' => '密码', 'kind' => 'secret_status'], - ['name' => 'bound_phone', 'label' => '绑定手机号', 'kind' => 'secret'], + ['name' => 'bound_phone', 'label' => '绑定手机号'], ['name' => 'verification_contact', 'label' => '手机号验证码对接人'], ['name' => 'account_group_name', 'label' => '账号分组名称'], ['name' => 'created_at', 'label' => '店铺创建时间', 'kind' => 'date'], diff --git a/tests/Feature/Business/PrototypePageTest.php b/tests/Feature/Business/PrototypePageTest.php index 8acfd614..8aa36544 100644 --- a/tests/Feature/Business/PrototypePageTest.php +++ b/tests/Feature/Business/PrototypePageTest.php @@ -21,7 +21,7 @@ class PrototypePageTest extends FeatureTestCase 'profit_center' => '测试利润中心', 'account_type' => '主账号', 'account' => 'test-account', - 'password_configured' => null, + 'password_configured' => true, 'bound_phone' => '13800000000', 'verification_contact' => '测试对接人', 'account_group_name' => '测试分组', @@ -44,7 +44,8 @@ class PrototypePageTest extends FeatureTestCase ->assertSeeText('共 958 条') ->assertSeeText('已从共享业务镜像读取 958 条数据') ->assertSeeText('主账号') - ->assertSeeText('状态未同步') + ->assertSeeText('已设置') + ->assertSeeText('13800000000') ->assertDontSeeText('MAIN') ->assertDontSeeText('共享镜像中暂未读取到店铺账号数据'); } diff --git a/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php b/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php index 7a4b0eab..77cb72d7 100644 --- a/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php +++ b/tests/Unit/EcommerceFinance/StoreAccountMirrorRepositoryTest.php @@ -46,6 +46,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase foreach (['storeName', 'operationOwner', 'operationDepartmentHead', 'operationDirector', 'profitCenter', 'accountType', 'account', 'boundPhone', 'verificationContact', 'accountGroupName', 'createdAt', 'updatedAt'] as $column) { $table->string($column)->nullable(); } + $table->boolean('passwordConfigured')->nullable(); }); DB::connection('business_mirror')->table('business_mirror_table_states')->insert([ 'dataset_key' => StoreAccountMirrorRepository::DATASET, @@ -66,6 +67,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase 'storeName' => '测试店铺', 'accountType' => $type, 'account' => 'test-account', + 'passwordConfigured' => $type === 'MAIN' ? true : ($type === 'SUB' ? false : null), ]); } @@ -74,6 +76,8 @@ class StoreAccountMirrorRepositoryTest extends TestCase $this->assertSame('主账号', $rows['account-' . md5('MAIN')]['account_type']); $this->assertSame('子账号', $rows['account-' . md5('SUB')]['account_type']); $this->assertNull($rows['account-' . md5('/')]['account_type']); - $this->assertNull($rows['account-' . md5('MAIN')]['password_configured']); + $this->assertTrue($rows['account-' . md5('MAIN')]['password_configured']); + $this->assertFalse($rows['account-' . md5('SUB')]['password_configured']); + $this->assertNull($rows['account-' . md5('/')]['password_configured']); } }