mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-12 14:05:39 +08:00
4.7.0
This commit is contained in:
@@ -0,0 +1,319 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\PointBundle;
|
||||
|
||||
use Dingo\Api\Exception\ResourceException;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Handler\MockHandler;
|
||||
use GuzzleHttp\HandlerStack;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use MembersBundle\Services\MemberService;
|
||||
use PointBundle\Services\PointMemberShuyunOpenPlatformPointListService;
|
||||
use DistributionBundle\Repositories\DistributorRepository;
|
||||
use ShuyunOpenPlatformBundle\Entities\CompanyShuyunOpenPlatformConfig;
|
||||
use ShuyunOpenPlatformBundle\Repositories\CompanyShuyunOpenPlatformConfigRepository;
|
||||
use ShuyunOpenPlatformBundle\Services\ShuyunOpenPlatformGatewayClientFactory;
|
||||
use ShuyunOpenPlatformBundle\Services\ShuyunOpenPlatformGatewayShopIdResolver;
|
||||
use ShuyunOpenPlatformBundle\Services\ShuyunOpenPlatformLoyaltyPointChangelogSearchService;
|
||||
use ShuyunOpenPlatformBundle\Services\ShuyunOpenPlatformShopSyncService;
|
||||
|
||||
/**
|
||||
* 计划 T-POINT-06~10:PointBundle 积分流水数云分支(列表服务 + Admin 辅助判定)。
|
||||
*/
|
||||
class PointMemberShuyunOpenPlatformPointListServiceTest extends \TestCase
|
||||
{
|
||||
/** T-POINT-06 */
|
||||
public function testBuildListFromChangelogMapsRowsAndTotals(): void
|
||||
{
|
||||
$body = [
|
||||
'code' => 10000,
|
||||
'data' => [
|
||||
'pageSize' => 10,
|
||||
'totals' => 2,
|
||||
'pageNum' => 1,
|
||||
'list' => [
|
||||
[
|
||||
'changePoint' => 10,
|
||||
'created' => '2022-06-15 09:33:13',
|
||||
'source' => 'OTHER',
|
||||
'desc' => '调试',
|
||||
'partnerSequence' => 'O-1',
|
||||
'recordId' => 386331442,
|
||||
'point' => 160,
|
||||
],
|
||||
[
|
||||
'changePoint' => -5,
|
||||
'created' => '2022-06-16 10:00:00',
|
||||
'source' => 'CONSUME',
|
||||
'desc' => '扣减',
|
||||
'partnerSequence' => '',
|
||||
'recordId' => 386331443,
|
||||
'point' => 155,
|
||||
],
|
||||
],
|
||||
],
|
||||
'msg' => '',
|
||||
];
|
||||
|
||||
$changelog = $this->changelogSearchWithJsonBody($body);
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$changelog,
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->createMock(MemberService::class),
|
||||
);
|
||||
|
||||
$out = $svc->buildListFromChangelog(1, 999, 9301, 1, 10, null);
|
||||
|
||||
$this->assertSame(2, $out['total_count']);
|
||||
$this->assertCount(2, $out['list']);
|
||||
$this->assertSame('999', $out['list'][0]['user_id']);
|
||||
$this->assertSame(10, $out['list'][0]['income']);
|
||||
$this->assertSame(0, $out['list'][0]['outcome']);
|
||||
$this->assertSame('income', $out['list'][0]['outin_type']);
|
||||
$this->assertSame(160, $out['list'][0]['s_point']);
|
||||
$this->assertSame(5, $out['list'][1]['outcome']);
|
||||
$this->assertSame('outcome', $out['list'][1]['outin_type']);
|
||||
}
|
||||
|
||||
/** T-POINT-06 — outin_type 过滤 */
|
||||
public function testBuildListFromChangelogFiltersByOutinType(): void
|
||||
{
|
||||
$body = [
|
||||
'code' => 10000,
|
||||
'data' => [
|
||||
'totals' => 2,
|
||||
'pageNum' => 1,
|
||||
'pageSize' => 10,
|
||||
'list' => [
|
||||
['changePoint' => 10, 'created' => '2022-01-01 00:00:00', 'source' => 'X', 'desc' => '', 'point' => 10],
|
||||
['changePoint' => -3, 'created' => '2022-01-02 00:00:00', 'source' => 'Y', 'desc' => '', 'point' => 7],
|
||||
],
|
||||
],
|
||||
'msg' => '',
|
||||
];
|
||||
|
||||
$changelog = $this->changelogSearchWithJsonBody($body);
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$changelog,
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->createMock(MemberService::class),
|
||||
);
|
||||
|
||||
$out = $svc->buildListFromChangelog(1, 1, 1, 1, 10, 'outcome');
|
||||
$this->assertCount(1, $out['list']);
|
||||
$this->assertSame(3, $out['list'][0]['outcome']);
|
||||
}
|
||||
|
||||
/** T-POINT-07 */
|
||||
public function testAssertEligibleThrowsWhenNotEligible(): void
|
||||
{
|
||||
$repo = $this->createMock(CompanyShuyunOpenPlatformConfigRepository::class);
|
||||
$cfg = $this->eligibleConfigEntity();
|
||||
$repo->method('findOneByCompanyId')->with(7)->willReturn($cfg);
|
||||
|
||||
$sync = $this->createMock(ShuyunOpenPlatformShopSyncService::class);
|
||||
$sync->method('isEligible')->with($cfg)->willReturn(false);
|
||||
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$this->deadChangelogSearch(),
|
||||
$repo,
|
||||
$sync,
|
||||
$this->createMock(MemberService::class),
|
||||
);
|
||||
|
||||
$this->expectException(ResourceException::class);
|
||||
$svc->assertEligibleOrThrow(7);
|
||||
}
|
||||
|
||||
/** T-POINT-07 — 无配置行 */
|
||||
public function testAssertEligibleThrowsWhenConfigMissing(): void
|
||||
{
|
||||
$repo = $this->createMock(CompanyShuyunOpenPlatformConfigRepository::class);
|
||||
$repo->method('findOneByCompanyId')->willReturn(null);
|
||||
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$this->deadChangelogSearch(),
|
||||
$repo,
|
||||
$this->createMock(ShuyunOpenPlatformShopSyncService::class),
|
||||
$this->createMock(MemberService::class),
|
||||
);
|
||||
|
||||
$this->expectException(ResourceException::class);
|
||||
$svc->assertEligibleOrThrow(1);
|
||||
}
|
||||
|
||||
/** T-POINT-08:数云会员能力关闭时,门面返回 false(与 Front 先判此开关再达摩/本地一致)。 */
|
||||
public function testTPoint08WhenMemberServiceSaysShuyunOffGateIsFalse(): void
|
||||
{
|
||||
$member = $this->createMock(MemberService::class);
|
||||
$member->method('isShuyunOpenPlatformMemberEnabled')->willReturn(false);
|
||||
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$this->deadChangelogSearch(),
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$member,
|
||||
);
|
||||
|
||||
$this->assertFalse($svc->isShuyunOpenPlatformMemberEnabled(100));
|
||||
}
|
||||
|
||||
/** T-POINT-09 */
|
||||
public function testTPoint09WhenShuyunOnIsTrue(): void
|
||||
{
|
||||
$member = $this->createMock(MemberService::class);
|
||||
$member->method('isShuyunOpenPlatformMemberEnabled')->willReturn(true);
|
||||
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$this->deadChangelogSearch(),
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$member,
|
||||
);
|
||||
|
||||
$this->assertTrue($svc->isShuyunOpenPlatformMemberEnabled(1));
|
||||
}
|
||||
|
||||
/** T-POINT-10:后管唯一定位单会员 */
|
||||
public function testExtractSingleUserIdScalarAndArray(): void
|
||||
{
|
||||
$this->assertSame(5, PointMemberShuyunOpenPlatformPointListService::extractSingleUserId(['user_id' => 5]));
|
||||
$this->assertSame(5, PointMemberShuyunOpenPlatformPointListService::extractSingleUserId(['user_id' => [5]]));
|
||||
$this->assertNull(PointMemberShuyunOpenPlatformPointListService::extractSingleUserId(['user_id' => [5, 6]]));
|
||||
$this->assertNull(PointMemberShuyunOpenPlatformPointListService::extractSingleUserId([]));
|
||||
}
|
||||
|
||||
/** T-POINT-10:日期筛选时走后管本地流水,不调数云分页 */
|
||||
public function testHasPointLogDateRangeFilter(): void
|
||||
{
|
||||
$this->assertTrue(PointMemberShuyunOpenPlatformPointListService::hasPointLogDateRangeFilter(['created|gte' => 1]));
|
||||
$this->assertFalse(PointMemberShuyunOpenPlatformPointListService::hasPointLogDateRangeFilter(['company_id' => 1]));
|
||||
}
|
||||
|
||||
public function testSearchFailureWrapsResourceException(): void
|
||||
{
|
||||
$stack = HandlerStack::create(new MockHandler([
|
||||
new Response(200, [], '{"code":11008,"data":null,"msg":"accessToken invalid"}'),
|
||||
]));
|
||||
$client = new Client(['handler' => $stack, 'base_uri' => 'http://open-api.test/']);
|
||||
config(['shuyun_open_platform.base_uri' => 'http://open-api.test']);
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$changelog = new ShuyunOpenPlatformLoyaltyPointChangelogSearchService(
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->mockDistributorRepoForPointList(1),
|
||||
new ShuyunOpenPlatformGatewayShopIdResolver(),
|
||||
$client,
|
||||
new ShuyunOpenPlatformGatewayClientFactory(null),
|
||||
);
|
||||
|
||||
$svc = new PointMemberShuyunOpenPlatformPointListService(
|
||||
$changelog,
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->createMock(MemberService::class),
|
||||
);
|
||||
|
||||
$this->expectException(ResourceException::class);
|
||||
$svc->buildListFromChangelog(1, 1, 1, 1, 10, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $body
|
||||
*/
|
||||
private function changelogSearchWithJsonBody(array $body): ShuyunOpenPlatformLoyaltyPointChangelogSearchService
|
||||
{
|
||||
config(['shuyun_open_platform.base_uri' => 'http://open-api.test']);
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$stack = HandlerStack::create(new MockHandler([
|
||||
new Response(200, [], json_encode($body, JSON_THROW_ON_ERROR)),
|
||||
]));
|
||||
$client = new Client(['handler' => $stack, 'base_uri' => 'http://open-api.test/']);
|
||||
|
||||
return new ShuyunOpenPlatformLoyaltyPointChangelogSearchService(
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->mockDistributorRepoForPointList(1),
|
||||
new ShuyunOpenPlatformGatewayShopIdResolver(),
|
||||
$client,
|
||||
new ShuyunOpenPlatformGatewayClientFactory(null),
|
||||
);
|
||||
}
|
||||
|
||||
private function deadChangelogSearch(): ShuyunOpenPlatformLoyaltyPointChangelogSearchService
|
||||
{
|
||||
config(['shuyun_open_platform.base_uri' => 'http://open-api.test']);
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
$client = new Client([
|
||||
'handler' => HandlerStack::create(new MockHandler([])),
|
||||
'base_uri' => 'http://open-api.test/',
|
||||
]);
|
||||
|
||||
return new ShuyunOpenPlatformLoyaltyPointChangelogSearchService(
|
||||
$this->mockConfigRepoEligible(),
|
||||
$this->mockShopEligibility(true),
|
||||
$this->mockDistributorRepoForPointList(1),
|
||||
new ShuyunOpenPlatformGatewayShopIdResolver(),
|
||||
$client,
|
||||
new ShuyunOpenPlatformGatewayClientFactory(null),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任意正整数 distributor_id 返回非虚拟店,便于列表单测覆盖多种 reg_distributor。
|
||||
*/
|
||||
private function mockDistributorRepoForPointList(int $companyId): DistributorRepository
|
||||
{
|
||||
$repo = $this->createMock(DistributorRepository::class);
|
||||
$repo->method('getInfo')->willReturnCallback(static function (array $filter) use ($companyId): array {
|
||||
$cid = (int) ($filter['company_id'] ?? 0);
|
||||
$did = (int) ($filter['distributor_id'] ?? 0);
|
||||
if ($cid !== $companyId || $did <= 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
'company_id' => $companyId,
|
||||
'distributor_id' => $did,
|
||||
'distributor_self' => 0,
|
||||
];
|
||||
});
|
||||
|
||||
return $repo;
|
||||
}
|
||||
|
||||
private function mockConfigRepoEligible(): CompanyShuyunOpenPlatformConfigRepository
|
||||
{
|
||||
$cfgRepo = $this->createMock(CompanyShuyunOpenPlatformConfigRepository::class);
|
||||
$cfgRepo->method('findOneByCompanyId')->willReturn($this->eligibleConfigEntity());
|
||||
|
||||
return $cfgRepo;
|
||||
}
|
||||
|
||||
private function mockShopEligibility(bool $ok): ShuyunOpenPlatformShopSyncService
|
||||
{
|
||||
$shopEligibility = $this->createMock(ShuyunOpenPlatformShopSyncService::class);
|
||||
$shopEligibility->method('isEligible')->willReturn($ok);
|
||||
|
||||
return $shopEligibility;
|
||||
}
|
||||
|
||||
private function eligibleConfigEntity(): CompanyShuyunOpenPlatformConfig
|
||||
{
|
||||
$e = new CompanyShuyunOpenPlatformConfig();
|
||||
$e->setCompanyId(1);
|
||||
$e->setAuthValue('av');
|
||||
$e->setAppId('aid');
|
||||
$e->setAppSecret('sec');
|
||||
$e->setAccessToken('tok');
|
||||
$e->setIsEnabled(1);
|
||||
|
||||
return $e;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\PointBundle;
|
||||
|
||||
use Dingo\Api\Exception\ResourceException;
|
||||
use PointBundle\Services\PointMemberShuyunOpenPlatformPointWriteService;
|
||||
|
||||
/**
|
||||
* 计划 T-POINT-12:addPoint → point.change 字段映射与门禁(与 T-POINT-04/05 网关单测互补)。
|
||||
*/
|
||||
class PointMemberShuyunOpenPlatformPointWriteServiceTest extends \TestCase
|
||||
{
|
||||
/** T-POINT-12:订单积分抵扣(journal 6 扣减 + 订单号)→ CONSUME + operator=user_id */
|
||||
public function testTPoint12OrderPointDeductionPayloadUsesConsumeAndMemberOperator(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'zdy1']);
|
||||
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
88001,
|
||||
1,
|
||||
50,
|
||||
false,
|
||||
6,
|
||||
'订单抵扣',
|
||||
'ORD-2026-001',
|
||||
[],
|
||||
[
|
||||
'user_id' => 88001,
|
||||
'reg_distributor' => 9301,
|
||||
]
|
||||
);
|
||||
|
||||
$this->assertSame('OFFLINE', $payload['platCode']);
|
||||
$this->assertSame('88001', $payload['id']);
|
||||
$this->assertSame('9301-off', $payload['shopId']);
|
||||
$this->assertSame('CONSUME', $payload['source']);
|
||||
$this->assertSame(-50, $payload['changePoint']);
|
||||
$this->assertSame('88001', $payload['operator']);
|
||||
$this->assertSame('订单抵扣', $payload['desc']);
|
||||
$this->assertStringStartsWith('sxop_', $payload['sequence']);
|
||||
}
|
||||
|
||||
public function testCancelReturnUsesRefundAndSystemOperator(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
1,
|
||||
1,
|
||||
100,
|
||||
true,
|
||||
9,
|
||||
'取消返还',
|
||||
'ORD-X',
|
||||
[],
|
||||
['user_id' => 1, 'reg_distributor' => 2]
|
||||
);
|
||||
|
||||
$this->assertSame('REFUND', $payload['source']);
|
||||
$this->assertSame(100, $payload['changePoint']);
|
||||
$this->assertSame('system', $payload['operator']);
|
||||
}
|
||||
|
||||
public function testRegisterGiftUsesMarket(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
1,
|
||||
1,
|
||||
10,
|
||||
true,
|
||||
1,
|
||||
'注册赠送积分',
|
||||
'',
|
||||
[],
|
||||
['user_id' => 1, 'reg_distributor' => 3]
|
||||
);
|
||||
|
||||
$this->assertSame('MARKET', $payload['source']);
|
||||
$this->assertSame('system', $payload['operator']);
|
||||
}
|
||||
|
||||
public function testShuyunSequenceOverride(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
true,
|
||||
1,
|
||||
'x',
|
||||
'',
|
||||
['shuyun_sequence' => 'fixed-seq-001'],
|
||||
['user_id' => 1, 'reg_distributor' => 1]
|
||||
);
|
||||
|
||||
$this->assertSame('fixed-seq-001', $payload['sequence']);
|
||||
}
|
||||
|
||||
public function testMissingRegDistributorThrows(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'OFFLINE']);
|
||||
|
||||
$this->expectException(ResourceException::class);
|
||||
PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
true,
|
||||
1,
|
||||
'x',
|
||||
'',
|
||||
[],
|
||||
['user_id' => 1, 'reg_distributor' => 0]
|
||||
);
|
||||
}
|
||||
|
||||
public function testResolveSourceAndOperatorPure(): void
|
||||
{
|
||||
$this->assertSame('CONSUME', PointMemberShuyunOpenPlatformPointWriteService::resolveSource(6, false));
|
||||
$this->assertSame('REFUND', PointMemberShuyunOpenPlatformPointWriteService::resolveSource(9, true));
|
||||
$this->assertSame('88001', PointMemberShuyunOpenPlatformPointWriteService::resolveOperator(88001, 6, false, 'O1'));
|
||||
$this->assertSame('system', PointMemberShuyunOpenPlatformPointWriteService::resolveOperator(88001, 6, false, ''));
|
||||
}
|
||||
|
||||
/** 开放网关 + 扣减 + 非零分:跳过本地 point_member 余额闸门 */
|
||||
public function testSkipsLocalPointMemberBalanceAfterOpenGatewayDeductWhenOpenPlatformAndDecrease(): void
|
||||
{
|
||||
$this->assertTrue(PointMemberShuyunOpenPlatformPointWriteService::skipsLocalPointMemberBalanceAfterOpenGatewayDeduct(true, false, 10));
|
||||
}
|
||||
|
||||
public function testDoesNotSkipLocalBalanceWhenOpenPlatformIncrease(): void
|
||||
{
|
||||
$this->assertFalse(PointMemberShuyunOpenPlatformPointWriteService::skipsLocalPointMemberBalanceAfterOpenGatewayDeduct(true, true, 10));
|
||||
}
|
||||
|
||||
public function testDoesNotSkipLocalBalanceWhenNotOpenPlatform(): void
|
||||
{
|
||||
$this->assertFalse(PointMemberShuyunOpenPlatformPointWriteService::skipsLocalPointMemberBalanceAfterOpenGatewayDeduct(false, false, 10));
|
||||
}
|
||||
|
||||
public function testDoesNotSkipLocalBalanceWhenPointZero(): void
|
||||
{
|
||||
$this->assertFalse(PointMemberShuyunOpenPlatformPointWriteService::skipsLocalPointMemberBalanceAfterOpenGatewayDeduct(true, false, 0));
|
||||
}
|
||||
|
||||
/** 开放网关积分变更恒 OFFLINE,shopId 经 GatewayShopIdResolver(config 后缀) */
|
||||
public function testBuildChangePayloadUsesConfiguredSuffixForShopId(): void
|
||||
{
|
||||
config([
|
||||
'shuyun_open_platform.default_plat_code' => 'NNORMALDTCUAT',
|
||||
'shuyun_open_platform.offline_plat_id_suffix' => '-offline',
|
||||
]);
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
41,
|
||||
1,
|
||||
99,
|
||||
true,
|
||||
1,
|
||||
'注册赠送积分',
|
||||
'',
|
||||
['shuyun_open_point_change_force_offline_plat' => true],
|
||||
['user_id' => 41, 'reg_distributor' => 5]
|
||||
);
|
||||
|
||||
$this->assertSame('OFFLINE', $payload['platCode']);
|
||||
$this->assertSame('5-offline', $payload['shopId']);
|
||||
$this->assertSame('MARKET', $payload['source']);
|
||||
}
|
||||
|
||||
public function testBuildChangePayloadIgnoresDefaultPlatCode(): void
|
||||
{
|
||||
config([
|
||||
'shuyun_open_platform.default_plat_code' => 'nnormaldtcuat',
|
||||
'shuyun_open_platform.offline_plat_id_suffix' => '-offline',
|
||||
]);
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
41,
|
||||
1,
|
||||
99,
|
||||
true,
|
||||
1,
|
||||
'注册赠送积分',
|
||||
'',
|
||||
[],
|
||||
['user_id' => 41, 'reg_distributor' => 5]
|
||||
);
|
||||
|
||||
$this->assertSame('OFFLINE', $payload['platCode']);
|
||||
$this->assertSame('5-offline', $payload['shopId']);
|
||||
}
|
||||
|
||||
public function testBuildChangePayloadExplicitFalseForceOfflineStillOffline(): void
|
||||
{
|
||||
config(['shuyun_open_platform.default_plat_code' => 'Z1']);
|
||||
$payload = PointMemberShuyunOpenPlatformPointWriteService::buildChangePayload(
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
true,
|
||||
1,
|
||||
'x',
|
||||
'',
|
||||
['shuyun_open_point_change_force_offline_plat' => false],
|
||||
['user_id' => 1, 'reg_distributor' => 5]
|
||||
);
|
||||
|
||||
$this->assertSame('OFFLINE', $payload['platCode']);
|
||||
$this->assertSame('5-off', $payload['shopId']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user