1.修改get_all_section_by_account

This commit is contained in:
whm
2025-11-01 14:15:32 +08:00
parent 61be8f9243
commit 51068dc4e1
3 changed files with 5 additions and 8 deletions

View File

@@ -412,11 +412,12 @@ def get_all_section_by_account(request: SectionByAccountRequest, db: Session = D
account_id = request.account_id
section_service = SectionDataService()
result_data = section_service.get_by_account_id(db, account_id=account_id)
data_list = [item.to_dict() for item in result_data] if result_data else []
return DataResponse(
code=ResponseCode.SUCCESS,
message="查询成功",
total=len(result_data),
data=result_data
total=len(data_list),
data=data_list
)
except Exception as e:
logger.error(f"Query section data failed: {str(e)}")