|
|
@@ -75,6 +75,7 @@ class NodeConfigurationService:
|
|
|
identifier: Optional[str] = None,
|
|
|
node_id: Optional[str] = None,
|
|
|
order_id: Optional[str] = None,
|
|
|
+ enable: Optional[int] = None,
|
|
|
) -> Tuple[int, List[Any]]:
|
|
|
model = cls.get_model(entry_type)
|
|
|
stmt = select(model)
|
|
|
@@ -89,6 +90,9 @@ class NodeConfigurationService:
|
|
|
if order_id and hasattr(model, "order_id"):
|
|
|
stmt = stmt.where(model.order_id == order_id)
|
|
|
count_stmt = count_stmt.where(model.order_id == order_id)
|
|
|
+ if enable is not None and hasattr(model, "enable"):
|
|
|
+ stmt = stmt.where(model.enable == enable)
|
|
|
+ count_stmt = count_stmt.where(model.enable == enable)
|
|
|
|
|
|
total = await db.scalar(count_stmt) or 0
|
|
|
offset = (page - 1) * page_size
|