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([