feat(OrderLogic): 更新订单逻辑,优化商品处理流程,调整商品字段获取方式
This commit is contained in:
parent
3f9bda6bef
commit
ee8a43b2ac
@ -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; //成本由采购价替代原成本为门店零售价
|
||||
@ -94,7 +94,7 @@ class OrderLogic extends BaseLogic
|
||||
$find['top_cate_id']=$find['cate_id'];
|
||||
if($StoreCategory && $StoreCategory['pid']>0){
|
||||
$StoreCategory2=StoreCategory::where('id',$StoreCategory['pid'])->find();
|
||||
if($StoreCategory2 && $StoreCategory['pid']>0){
|
||||
if($StoreCategory2 && $StoreCategory2['pid']>0){
|
||||
$find['top_cate_id']=$StoreCategory2['pid'];
|
||||
}else{
|
||||
$find['top_cate_id']=$StoreCategory['pid'];
|
||||
@ -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']];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user