|
|
@@ -40,40 +40,13 @@ class CashClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
//获取提现费率 ssh 20210623
|
|
|
- public static function getRate($currentPtStyle, $shopId)
|
|
|
+ public static function getRate($currentPtStyle, $main)
|
|
|
{
|
|
|
- if ($currentPtStyle == dict::getDict('ptStyle', 'hd')) {
|
|
|
- return 0.006;
|
|
|
- } elseif ($currentPtStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
- //纯彩花艺
|
|
|
- if ($shopId == 10 || $shopId == 22) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- //天天鲜花 阿东 当天到账
|
|
|
- if ($shopId == 763 || $shopId == 795 || $shopId == 1405) {
|
|
|
- return 0.0035;
|
|
|
- }
|
|
|
- //泉城
|
|
|
- if ($shopId == 447 || $shopId == 1105) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- //都市花季
|
|
|
- if ($shopId == 1212 || $shopId == 1315) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- //惠雅鲜花
|
|
|
- if ($shopId == 1489 || $shopId == 520) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- //花样年华
|
|
|
- if ($shopId == 1585 || $shopId == 1596) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- //丽子鲜花 翔安店
|
|
|
- if ($shopId == 1527) {
|
|
|
- return 0.003;
|
|
|
- }
|
|
|
- return 0.0038;
|
|
|
+ if ($currentPtStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
+ $rate = $main->rate ?? 3.8;
|
|
|
+ $rateVal = bcdiv($rate, 1000, 4);
|
|
|
+ $rateVal = floatval($rateVal);
|
|
|
+ return $rateVal;
|
|
|
}
|
|
|
return 0.006;
|
|
|
}
|
|
|
@@ -127,7 +100,7 @@ class CashClass extends BaseClass
|
|
|
|
|
|
//应转金额
|
|
|
$ptStyle = $shop->ptStyle;
|
|
|
- $rate = CashClass::getRate($ptStyle, $shop->id);
|
|
|
+ $rate = CashClass::getRate($ptStyle, $main);
|
|
|
$tip = bcmul($txBalance, $rate, 2);
|
|
|
$beAmount = bcsub($txBalance, $tip, 2);
|
|
|
|