Merge pull request '修复队列订单异常' (#17) from feature_orderhandle into master

Reviewed-on: #17
This commit is contained in:
mkm 2023-09-08 14:20:01 +08:00
commit 34bd77c2c5

View File

@ -58,16 +58,17 @@ class SendGoodsCodeJob implements JobInterface
'street_code' => $addressInfo[3] ?? '',
'village_code' => $addressInfo[4] ?? '',
'brigade_id' => $addressInfo[5] ?? 0,
'product_id' => 0,
'product_price' => 0,
'total_price' => $order['pay_price'] ?? 0,
'product_num' => $order['total_num'] ?? 0,
'status' => 1,
'create_time' => date('Y-m-d H:i:s')
];
//商品信息
$productInfo = Db::name('store_order_product')->where('order_id', $order['order_id'] ?? 0)->find();
if ($productInfo) {
$productOrder['product_id'] = $productInfo['product_id'] ?? 0;
$productOrder['product_price'] = $productInfo['product_price'] ?? 0;
$productOrder['total_price'] = $productInfo['total_price'] ?? 0;
$productOrder['product_num'] = $productInfo['product_num'] ?? 0;
}
//商户信息
$merchantInfo = Db::name('merchant')->where('mer_id', $order['mer_id'] ?? 0)->find();