From d76b102bca5a062f48af98380df658ce2b473b41 Mon Sep 17 00:00:00 2001 From: qiuxiang <394405259@qq.com> Date: Wed, 7 Oct 2026 13:20:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=BB=E8=B4=A6=E5=A4=87=E6=B3=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=8F=A3=E5=BE=84=EF=BC=9A1688=20/=20=E6=96=B0?= =?UTF-8?q?=E4=BD=B0=E5=B9=BF=20=E5=89=8D=E7=BC=80=E6=8C=89=E9=98=BF?= =?UTF-8?q?=E9=87=8C=E5=B7=B4=E5=B7=B4=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新佰广1688、1688xxx 店铺名不带「阿里巴巴」前缀,之前落到页签默认平台(淘系支付宝=淘宝), 1688 系账单项目匹配不到总账备注;新增两条前缀映射(1688、新佰广 → 阿里巴巴)并补单测断言。 --- modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php | 4 ++++ tests/Unit/EcommerceFinance/AccountLedgerRemarkMapTest.php | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php b/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php index e5bf0197..2c93405c 100644 --- a/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php +++ b/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php @@ -55,6 +55,10 @@ class AccountLedgerRemarkMap '唯品会JX' => '唯品会jx', '唯品会MP' => '唯品会MP', '阿里巴巴' => '阿里巴巴', + // 1688 系店铺:新佰广1688 / 1688xxx 等店铺名不带「阿里巴巴」前缀, + // 按平台口径归到阿里巴巴,账单项目与阿里巴巴一致(阿里-xxx 仍走上面的前缀)。 + '1688' => '阿里巴巴', + '新佰广' => '阿里巴巴', '拼多多' => '拼多多', '天猫' => '天猫', '淘宝' => '淘宝', diff --git a/tests/Unit/EcommerceFinance/AccountLedgerRemarkMapTest.php b/tests/Unit/EcommerceFinance/AccountLedgerRemarkMapTest.php index 33acf209..a3169b19 100644 --- a/tests/Unit/EcommerceFinance/AccountLedgerRemarkMapTest.php +++ b/tests/Unit/EcommerceFinance/AccountLedgerRemarkMapTest.php @@ -105,6 +105,7 @@ class AccountLedgerRemarkMapTest extends TestCase DB::table('ec_account_ledger_remarks')->insert([ ['platform' => '抖音', 'bill_item' => '保费扣除', 'ledger_remark' => '运费险', 'created_at' => $now, 'updated_at' => $now], ['platform' => '天猫', 'bill_item' => '天猫佣金', 'ledger_remark' => '平台佣金', 'created_at' => $now, 'updated_at' => $now], + ['platform' => '阿里巴巴', 'bill_item' => '1688大分销业务平台抽佣', 'ledger_remark' => '1688佣金', 'created_at' => $now, 'updated_at' => $now], ]); $map = new AccountLedgerRemarkMap(); @@ -112,6 +113,10 @@ class AccountLedgerRemarkMapTest extends TestCase $this->assertSame('运费险', $map->remark('抖音-乾廷润凯家具专卖店', '抖音', '保费扣除')); $this->assertSame('平台佣金', $map->remark('天猫-卓尔家具旗舰店', '淘宝', '天猫佣金')); $this->assertSame('平台佣金', $map->remark('没有平台前缀的店铺', '天猫', '天猫佣金')); + // 1688 / 新佰广 前缀按阿里巴巴口径匹配(店铺名不带「阿里巴巴」前缀) + $this->assertSame('阿里巴巴', $map->platform('新佰广1688', '淘宝')); + $this->assertSame('阿里巴巴', $map->platform('1688某某旗舰店', '淘宝')); + $this->assertSame('1688佣金', $map->remark('新佰广1688', '淘宝', '1688大分销业务平台抽佣')); $this->assertNull($map->remark('抖音-乾廷润凯家具专卖店', '抖音', '不存在的账单项目')); $row = $map->decorate([