fix(api): 修正更新订单总金额逻辑

- 将 BeforehandOrder::where('id', $params['id']) 修改为 BeforehandOrder::where('id', $outbound_id')
- 此修改确保了更新订单总金额时使用正确的订单 ID
This commit is contained in:
mkm 2025-02-03 14:35:10 +08:00
parent 82c1eb1ce6
commit 7469bd3fe5

View File

@ -154,7 +154,7 @@ class DemoLogic extends BaseLogic
}
});
$total_price=WarehouseProduct::where('oid', $outbound_id)->sum('total_price');
BeforehandOrder::where('id', $params['id'])->update(['total_price' => $total_price]);
BeforehandOrder::where('id', $outbound_id)->update(['total_price' => $total_price]);
}
}