refactor(app): 移除编辑和删除订单时的店铺配置检查

- 注释掉了 StoreOrderCartInfoLogic 类中的两段代码,分别位于编辑订单和删除订单的方法中
- 这些代码段原本用于检查店铺配置和验证订单是否属于可设置店铺
- 移除这些检查后,编辑和删除操作将不再受限于店铺配置
This commit is contained in:
mkm 2024-12-18 12:12:53 +08:00
parent b110e042d8
commit 516adaf674

View File

@ -106,13 +106,13 @@ class StoreOrderCartInfoLogic extends BaseLogic
if($find['is_pay']==1){
throw new BusinessException('已支付订单无法编辑');
}
$value=DictData::where('type_value','vendors_store')->column('value');
if(!$value){
throw new BusinessException('请先配置店铺');
}
if(!in_array($find['store_id'],$value)){
throw new BusinessException('该订单不属于可设置店铺');
}
// $value=DictData::where('type_value','vendors_store')->column('value');
// if(!$value){
// throw new BusinessException('请先配置店铺');
// }
// if(!in_array($find['store_id'],$value)){
// throw new BusinessException('该订单不属于可设置店铺');
// }
$find->cart_num = $params['cart_num'];
$find->total_price = bcmul($params['cart_num'], $find->price, 2);
$find->save();
@ -144,13 +144,13 @@ class StoreOrderCartInfoLogic extends BaseLogic
if($find['is_pay']==1){
throw new BusinessException('已支付订单无法删除');
}
$value=DictData::where('type_value','vendors_store')->column('value');
if(!$value){
throw new BusinessException('请先配置店铺');
}
if(!in_array($find['store_id'],$value)){
throw new BusinessException('该订单不属于可设置店铺');
}
// $value=DictData::where('type_value','vendors_store')->column('value');
// if(!$value){
// throw new BusinessException('请先配置店铺');
// }
// if(!in_array($find['store_id'],$value)){
// throw new BusinessException('该订单不属于可设置店铺');
// }
$find->delete_time=time();
$find->save();
$total_price = StoreOrderCartInfo::where('oid', $find['oid'])->sum('total_price');