订单添加处理逻辑 拆分

feat/task1-c-wallet
Devil 2021-09-13 12:33:35 +08:00
parent c1ea028c77
commit b289d2627f
1 changed files with 3 additions and 1 deletions

View File

@ -1232,9 +1232,10 @@ class BuyService
{
throw new \Exception('订单添加失败');
}
$order['id'] = $order_id;
// 订单详情添加
foreach($v['detail_data'] as $vs)
foreach($v['detail_data'] as &$vs)
{
// 添加订单详情数据,data返回自增id
$order_detail_id = 0;
@ -1242,6 +1243,7 @@ class BuyService
if($ret['code'] == 0)
{
$order_detail_id = $ret['data'];
$vs['id'] = $order_detail_id;
} else {
throw new \Exception($ret['msg']);
}