refactor(warehouse): 优化仓库产品逻辑中的订单类型判断
- 将原有的 != 7 判断条件改为 in_array([1,4]),以提高代码可读性和维护性 - 此修改仅在 order_type 不等于 6 的情况下生效,不影响其他逻辑
This commit is contained in:
parent
6f39a58b16
commit
a1b759b0aa
@ -125,7 +125,7 @@ class WarehouseProductLogic extends BaseLogic
|
||||
if ($params['order_type'] != 6) {
|
||||
$storege = WarehouseProductStorege::where('warehouse_id', $params['warehouse_id'])->where('product_id', $params['product_id'])->find();
|
||||
if ($storege) {
|
||||
if($params['order_type']!=7){
|
||||
if(in_array($params['order_type'],[1,4])){
|
||||
SystemStoreStorage::create([
|
||||
'store_id' => $params['store_id'],
|
||||
'admin_id' => $params['admin_id'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user