累计收益不累加的问题

ymwl
lqmac 1 year ago
parent 9879d074ae
commit a7db2d00ed
  1. 2
      application/api/controller/Order.php

@ -589,7 +589,7 @@ class Order extends Api
$profit = $profit + $coupon_price + $pay_amount;
Record::create(["user_id" => $user_id, "type" => 2, "item_id" => $order_id,"amount"=> $profit]);
//修改用户可用佣金
User::where('id', $user_id)->update(['available_commission_amount' => $user['available_commission_amount'] - $pay_amount,"profit_amount" =>$profit, "updatetime" => time()]);
User::where('id', $user_id)->update(['available_commission_amount' => $user['available_commission_amount'] - $pay_amount,"profit_amount" =>$user['profit_amount'] + $profit, "updatetime" => time()]);
//更新订单信息
OrderModel::where("id", $order_id)->update(['status' => 7]);
Detail::where("order_id", $order_id)->update(['commission_price' => $goods_price, "fee" => $fee, "dikou_price" => $pay_amount]);

Loading…
Cancel
Save