按店铺平台及三家指定天猫店铺配置提现预留标准。 Co-authored-by: 92451 <924518135@qq.com> Co-committed-by: 92451 <924518135@qq.com>
36 lines
917 B
PHP
36 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Business;
|
|
|
|
final class WithdrawalReserveStandard
|
|
{
|
|
private const TMALL_HIGH_RESERVE_STORES = [
|
|
'天猫-亿家达旗舰店',
|
|
'天猫-欧意朗旗舰店',
|
|
'天猫-卓禾家具旗舰店',
|
|
];
|
|
|
|
private const PLATFORM_DEFAULTS = [
|
|
'天猫' => 20000,
|
|
'淘宝' => 10000,
|
|
'淘宝分销' => 10000,
|
|
'阿里巴巴' => 10000,
|
|
'京东' => 5000,
|
|
'京喜' => 5000,
|
|
'抖音' => 5000,
|
|
'拼多多' => 5000,
|
|
];
|
|
|
|
public static function amountFor(?string $platform, ?string $erpStoreName): ?int
|
|
{
|
|
$platform = trim((string) $platform);
|
|
$erpStoreName = trim((string) $erpStoreName);
|
|
|
|
if ($platform === '天猫' && in_array($erpStoreName, self::TMALL_HIGH_RESERVE_STORES, true)) {
|
|
return 50000;
|
|
}
|
|
|
|
return self::PLATFORM_DEFAULTS[$platform] ?? null;
|
|
}
|
|
}
|