fix(api): 修正更新订单总价格时的表名引用
- 将 BeforehandOrder 修改为 WarehouseOrder,以匹配上下文中的仓库订单逻辑 - 引入 WarehouseOrder 模型用于更新订单总价格
This commit is contained in:
parent
7469bd3fe5
commit
ffd5fa44c4
@ -8,6 +8,7 @@ use app\common\model\beforehand_order_cart_info\BeforehandOrderCartInfo;
|
|||||||
use app\common\model\store_branch_product\StoreBranchProduct;
|
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||||
use app\common\model\store_product\StoreProduct;
|
use app\common\model\store_product\StoreProduct;
|
||||||
use app\common\model\store_product_group_price\StoreProductGroupPrice;
|
use app\common\model\store_product_group_price\StoreProductGroupPrice;
|
||||||
|
use app\common\model\warehouse_order\WarehouseOrder;
|
||||||
use app\common\model\warehouse_product\WarehouseProduct;
|
use app\common\model\warehouse_product\WarehouseProduct;
|
||||||
use app\common\model\warehouse_product_storege\WarehouseProductStorege;
|
use app\common\model\warehouse_product_storege\WarehouseProductStorege;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -154,7 +155,7 @@ class DemoLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$total_price=WarehouseProduct::where('oid', $outbound_id)->sum('total_price');
|
$total_price=WarehouseProduct::where('oid', $outbound_id)->sum('total_price');
|
||||||
BeforehandOrder::where('id', $outbound_id)->update(['total_price' => $total_price]);
|
WarehouseOrder::where('id', $outbound_id)->update(['total_price' => $total_price]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user