feat(CapitalFlowLogic, CommissionProductLogic): 新增/修改逻辑以处理订单支付/退款及商品佣金计算

This commit is contained in:
mkm 2024-09-03 22:53:26 +08:00
parent cbeb06426d
commit c2a617aca8
2 changed files with 6 additions and 3 deletions

View File

@ -166,6 +166,7 @@ class CapitalFlowLogic extends BaseLogic
case 'store_order_refund':
return "店铺订单退款{$amount}";
case 'store_margin_refund':
case 'store_paid_deposit_refund':
return "店铺退还保证金{$amount}";
case 'user_order_promotion':
return "订单推广佣金{$amount}";
@ -185,6 +186,8 @@ class CapitalFlowLogic extends BaseLogic
return "订单退回到余额{$amount}";
case 'purchase_refund':
return "订单退回到采购款{$amount}";
case 'store_paid_deposit_add':
return "门店增加保证金{$amount}";
default:
return "订单支付{$amount}";
}

View File

@ -250,9 +250,9 @@ class CommissionProductLogic extends BaseLogic
$total_price = bcmul($product['price'], $find['cart_num']);
$purchase_price = bcmul($product['purchase'], $find['cart_num']);
$price=$product['price'];
$brigade_number = bcmul($total_price, 0.02, 2);
$village_number = bcmul($brigade_number, 0.1, 2);
$platform_number = bcmul($total_price, 0.02, 2);
$brigade_number = bcmul($total_price, 0.02, 2);//队长
$village_number = bcmul($brigade_number, 0.1, 2);//村长
$platform_number = bcmul($total_price, 0.02, 2);//平台
$number1 = bcadd($brigade_number, $village_number, 2);
$number2 = bcadd($number1, $platform_number, 2);