diff --git a/app/Domains/Virtual/Jobs/LogSyncJob.php b/app/Domains/Virtual/Jobs/LogSyncJob.php index 51134627..38beaffc 100644 --- a/app/Domains/Virtual/Jobs/LogSyncJob.php +++ b/app/Domains/Virtual/Jobs/LogSyncJob.php @@ -88,15 +88,15 @@ class LogSyncJob implements ShouldQueue $package = $this->getPackage($value['content']); $company = $this->getCompany(CommonService::stringifyCompanyId($value['company'])); $unit_price = intval($value['order_account'] * 100); - $custom_price = intval($value['order_account'] * 100); $product = $this->getProduct($package, $value['company'], $unit_price); $type = self::$types[$value['type']]; $pay_channel = self::$payChannels[$value['pay_type']]; // 按规则生成订单编号 (月6+类型1+公司3+套餐4+价格6) - $sn = date('Ym', $value['create_time']) . $type . sprintf('%03d', $company['id']) . sprintf('%04d', $package['id']) . sprintf('%06d', $custom_price); + $sn = date('Ym', $value['create_time']) . $type . sprintf('%03d', $company['id']) . sprintf('%04d', $package['id']) . sprintf('%06d', $unit_price); $counts = isset($orderArray[$sn]) ? $orderArray[$sn]['counts'] + 1 : 1; + $total_price = isset($orderArray[$sn]) ? $orderArray[$sn]['total_price'] + $unit_price : $unit_price; $orderArray[$sn] = [ 'sn' => $sn, @@ -108,8 +108,8 @@ class LogSyncJob implements ShouldQueue 'pay_channel' => $pay_channel, 'unit_price' => $unit_price, 'counts' => $counts, - 'total_price' => $unit_price, - 'custom_price' => $custom_price, + 'total_price' => $total_price, + 'custom_price' => $total_price, 'order_at' => date('Y-m-d H:i:s', $value['create_time']), 'order_status' => 4, 'transaction_status' => 1,