提交
This commit is contained in:
1 parent
a903fcf6d4
commit
259c55cc23
80 files changed
+6090
-123
No files matched your search
@@ -53,6 +53,7 @@ from app.crud.crm.product import (
|
||||
from app.schemas.crm.product import (
|
||||
CategoryDeleteBody,
|
||||
ProductCategoryCreateBody,
|
||||
ProductCategoryTreeBody,
|
||||
ProductCategoryUpdateBody,
|
||||
ProductCreateBody,
|
||||
ProductDeleteBody,
|
||||
@@ -325,23 +326,20 @@ router = APIRouter(prefix="/web/crm", tags=["CRM管理"])
|
||||
|
||||
@router.post("/product-categories/tree")
|
||||
def category_tree(
|
||||
body: dict = None,
|
||||
body: ProductCategoryTreeBody = None,
|
||||
_user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""获取产品分类树"""
|
||||
"""获取产品分类树(名称/状态由服务端过滤)"""
|
||||
try:
|
||||
tenant_no = get_tenant_no(db, _user)
|
||||
user_info = crm_user_info(_user)
|
||||
user_info = crm_user_info(_user)
|
||||
payload = body or {}
|
||||
category_name = payload.get("categoryName") or payload.get("category_name")
|
||||
status = payload.get("status")
|
||||
q = body or ProductCategoryTreeBody()
|
||||
rows = list_category_tree(
|
||||
db,
|
||||
tenant_no,
|
||||
category_name=category_name,
|
||||
status=status,
|
||||
category_name=q.category_name,
|
||||
status=q.status,
|
||||
user_info=user_info,
|
||||
)
|
||||
return success_response(rows)
|
||||
|
||||
Reference in new issue
Block a user