feat(OrderLogic): 更新订单逻辑,优化商品处理流程,调整商品字段获取方式

This commit is contained in:
mkm 2024-08-02 20:55:28 +08:00
parent ee8a43b2ac
commit f33a4d4ae8

View File

@ -71,7 +71,7 @@ class OrderLogic extends BaseLogic
self::setError('购物车为空');
return false;
}
// try {
try {
self::$total_price = 0;
self::$pay_price = 0;
self::$cost = 0; //成本由采购价替代原成本为门店零售价
@ -246,10 +246,10 @@ class OrderLogic extends BaseLogic
}
}
}
// } catch (\Exception $e) {
// self::setError($e->getMessage());
// return false;
// }
} catch (\Exception $e) {
self::setError($e->getMessage());
return false;
}
return ['order' => $order, 'cart_list' => $cart_select, 'shopInfo' => $store['near_store']];
}