feat: 修改CommissionProductLogic类以计算佣金

This commit is contained in:
mkm 2024-07-27 17:41:32 +08:00
parent 6ddcab62b6
commit 9117e3eb89

View File

@ -110,9 +110,9 @@ class CommissionProductLogic extends BaseLogic
public function b($find, $order, $product)
{
$rose = bcdiv($product['rose'], 100, 2);
// $rose = bcdiv($product['rose'], 100, 2);
$total_price = bcmul($product['purchase'], $find['cart_num']);
$commission = bcmul($total_price, $rose, 2);
$commission = bcmul($total_price, 0.02, 2);
//供货价
$total_cost = bcmul($product['cost'], $find['cart_num']);