订单贡献值格式调整

main
limu 12 months ago
parent c4a78b46c8
commit 38be24aaa2
  1. 3
      app/common/repositories/store/order/StoreOrderCreateRepository.php
  2. 2
      app/common/repositories/store/order/StoreOrderRepository.php
  3. 1
      crmeb/jobs/OrderPartnerJob.php

@ -1058,6 +1058,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
$rate = bcmul($merchantCart['merchantCategory']['commission_rate'], 100, 4);
}
$user_address = isset($address) ? ($address['province'] . $address['city'] . $address['district'] . $address['street'] . $address['detail']) : '';
//整理订单数据
$_order = [
'cartInfo' => $merchantCart,
@ -1093,7 +1094,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
'coupon_price' => bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2),
'platform_coupon_price' => $merchantCart['order']['platform_coupon_price'],
'pay_type' => $pay_type,
'user_address_id' => $user_address['address_id'] ?? 0,
'user_address_id' => $address['address_id'] ?? 0,
];
$allUseCoupon = array_merge($allUseCoupon, $merchantCart['order']['useCouponIds']);
$orderList[] = $_order;

@ -745,7 +745,7 @@ class StoreOrderRepository extends BaseRepository
$storeOrderStatusRepository->{$func}($orderStatus);
});
//推送到贡献值结算队列
Queue::push(OrderPartnerJob::class, compact('order'));
Queue::push(OrderPartnerJob::class, $order->toArray());
event('order.take', compact('order'));

@ -34,6 +34,7 @@ class OrderPartnerJob implements JobInterface
public function fire($job, $data)
{
file_put_contents('/tmp/debug_partner', '开始处理贡献值订单:'.var_export($data, 1), 8);
try {
//初始化贡献值
$bao_price = $mian_price = $ping_price = $total_price = 0;

Loading…
Cancel
Save