|
|
@ -589,7 +589,7 @@ class Order extends Api |
|
|
|
$profit = $profit + $coupon_price + $pay_amount; |
|
|
|
$profit = $profit + $coupon_price + $pay_amount; |
|
|
|
Record::create(["user_id" => $user_id, "type" => 2, "item_id" => $order_id,"amount"=> $profit]); |
|
|
|
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]); |
|
|
|
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]); |
|
|
|
Detail::where("order_id", $order_id)->update(['commission_price' => $goods_price, "fee" => $fee, "dikou_price" => $pay_amount]); |
|
|
|